php连接oracle必要步骤

1、修改php.ini文件,打开extension=php_oci8.dll扩展。
2、拷贝php安装目录/ext/php_oci8.dll文件到system32目录下。
3、测试:
$conn = oci_connect("scott", "tiger", $db);
if (!$conn) {
    $e = oci_error();
    print htmlentities($e['message']);
    exit;
}else {
    echo "连接oracle成功!";
}

你可能感兴趣的:(php连接oracle必要步骤)