PHP怎么连接oracle

WBOY
Release: 2016-06-13 12:16:39
Original
1116 people have browsed it

PHP如何连接oracle
oracle地地址是  172.16.19.100    用户名 ocms 密码 pwdocms 服务名 aircms 版本是oracle 9I

我的PHP脚本的电脑已经安装好oracle客户端,phpinfo里面也有oci,不存在环境有问题之类的。

<br />$conn = oci_connect('ocms','pwdcms','172.16.19.100:1521/aircms');<br /><br />var_dump($conn);<br /><br />
Copy after login


然后提示信息是这样的:

Warning: oci_connect() [function.oci-connect]: ORA-12705: Cannot access NLS data files or invalid environment specified in D:\service\web\index.php on line 2
bool(false)

[email protected]  bool(false),这样应该是算连接不成功了吧,用户名和密码都没问题,请问下连接的函数是这个吗,我问了一些人说大概是 oci_connect这个函数上面第三个参数出问题了,请问下正确的第三个参数应该怎么写呢。
------解决思路----------------------
 $a = $_POST["id"];
 $conn  = mysql_connect("localhost","root",""); 
 $my_db = mysql_select_db("demo",$conn);
 $sql="select * from demo where id = $a";
    $result = mysql_query($sql, $conn);
$userInfo = mysql_fetch_assoc($result);             

------解决思路----------------------
http://www.2cto.com/kf/201211/166356.html
------解决思路----------------------
密码 pwdocms
oci_connect('ocms','pwdcms','172.16.19.100:1521/aircms')

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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template