Home > php教程 > php手册 > body text

php连接oracle数据库的核心步骤,oracle数据库

WBOY
Release: 2016-06-13 08:38:06
Original
1404 people have browsed it

php连接oracle数据库的核心步骤,oracle数据库

本文实例讲述了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成功!";
}

Copy after login

更多关于PHP相关内容感兴趣的读者可查看本站专题:《PHP基于pdo操作数据库技巧总结》、《PHP+MongoDB数据库操作技巧大全》、《php面向对象程序设计入门教程》、《php字符串(string)用法总结》、《php+mysql数据库操作入门教程》及《php常见数据库操作技巧汇总》

希望本文所述对大家PHP程序设计有所帮助。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template