php连接Oracle,提示Call to undefined function Ora_Logon()
按照资料写的一小段代码
<?
if ($conn=Ora_Logon( "hr@TNSNAME ", "hr "))
{
echo "SUCCESS ! Connected to database\n ";
}
else
{
echo "Failed :-( Could not connect to database\n ";}
Ora_Logoff($conn);
phpinfo();
?>
提示 Ora_Logon函数为定义,为什么?
我在php.ini里面已经把extension=php_oci8.dll的分号去掉
并且把php_oci8.dll考入windows/system32里面了。
------解决方案--------------------不是你这样就可以安装好Oracle的扩展的……
而且ora_logon属于CXIII. Oracle 函数(已废弃)
你一要用 CVII. Oracle 函数
http://cn.php.net/manual/zh/ref.oci8.php
------解决方案--------------------Did you config your php with Oracle while installing it? Please check below
./configure --prefix=/appbin/php --with-apxs2=/appbin/apache/bin/apxs --with-oci8=$ORACLE_HOME
$ORACLE_HOME is path which your Oracle clinet/server located,
then 用oci_connect() or 用oci_newconnect(),Please check php doc for detail