Conn.php页面:
[code=php]
$con = oci_connect("finaltest","finaltestpw","(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.19.101.72)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ENGDB01)
))
");
if (!$con)
{
die('Could not connect: ' . oci_error());
}
//echo "This is a test!";
?>
[/code]
经测试,此页面没有问题。
登录页面问题部分:
[code=php]
include('conn.php');
$sql = "SELECT * from \"BadDut.user\" WHERE \"Account\"='".strtolower($_POST["username"])."'" ;
//echo $sql;
$result = oci_parse($con,$sql);
oci_execute($result);
//echo $result;
oci_commit($con);
echo oci_num_rows($result);
if (oci_num_rows($result) == 0)
{
echo " ";
echo " ";
oci_