The example in this article describes the core steps of php connecting to the oracle database. Share it with everyone for your reference, the details are as follows:
1. Modify the php.ini file and open the extension=php_oci8.dll extension.
2. Copy the php installation directory/ext/php_oci8.dll file to the system32 directory.
3. Test code:
$conn = oci_connect("scott", "tiger", $db); if (!$conn) { $e = oci_error(); print htmlentities($e['message']); exit; }else { echo "连接oracle成功!"; }
Readers who are interested in more PHP-related content can check out the special topics of this site: "Summary of PHP database operation skills based on pdo", "PHP MongoDB database operation skills collection", "php object-oriented programming introductory tutorial", "php Summary of String Usage", "Introduction Tutorial on PHP MySQL Database Operation" and "Summary of PHP Common Database Operation Skills"
I hope this article will be helpful to everyone in PHP programming.