连接 < ? if ($conn=Ora_Logon("user@TNSNAME","passWord")) { echo "SUCCESS ! Connected to database/n"; }else {echo "Failed :-( Could not connect to database/n";} Ora_Logoff($conn); phpinfo(); ?>
if(!isset($PHP_AUTH_USER)) { Header("WWW-authenticate: basic realm=/"$SID/""); Header("HTTP/1.0 401 Unauthorized"); $title="Login Instructions"; echo " You are not authorized to enter the site /n"; exit; } else { if (!($conn=ora_logon("$PHP_AUTH_USER@$SID",$PHP_AUTH_PW))) {Header("WWW-authenticate: basic realm=/"$SID/""); Header("HTTP/1.0 401 Unauthorized"); $title="Login Instructions"; echo " You are not authorised to enter the site /n"; exit; }} ?>