php中用mysql_connect()时出错。

由 sshg 在 01-29-2004 17:05 发表:

php中用mysql_connect()时出错。

安装好mysql/apache/php后,phpinfo()可以用,

但下面的脚本会有这样的提示:Fatal error: Call to undefined function: mysql_connect() in ×××

这是为什么,难道这个函数还在声明吗?

 1   
 2  
 3$link = mysql_connect("localhost", "root", "shg8718321")   
 4  
 5or die("Could not connect: " . mysql_error());   
 6  
 7print ("Connected successfully");   
 8  
 9mysql_close($link);   
10  

世界因你而精彩


由 sshg 在 01-29-2004 18:05 发表:


我在编辑时带了参数--with-mysql=/usr/local/mysql


世界因你而精彩


由 sshg 在 01-30-2004 12:21 发表:


版本信息,

Linux redsea 2.6.0 #3 Mon Dec 22 08:40:44 CST 2003 i686

Apache 2.0 Filter

PHP Version 4.3.2

mysql 4.3.4

请大家多多帮助,真得很急。


世界因你而精彩


由 harrypotter 在 01-30-2004 14:01 发表:


php编译的能支持mysql4.x吗?


Harry Potter LOTR GnOmE!


新机子:p4c-1.7+512DDR+40G(Fedora Core 1:15G)+ac97+geforce2MX400


http://freshmeat.net/projects/mydiary/


由 ansel 在 0

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus