Fatal error: Call to undefined function: mysql_con
时间:2009-05-20 来源:sss0213
debian 安装方法:
apt-get install apache2 mysql-server-5.0 php5-common php5-mysql libapache2-mob-php5
apt-get install apache2 mysql-server-5.0 php5
apt-get clean
apt-get install libmysql++-dev
/etc/init.d/apache2 start
php代码如下: $link = mysql_connect("ip", "username", "password");
if(FALSE == $link)
{
echo "Connect database failed!";
}
echo "Connect database sucess!";
mysql_select_db('dbname', $link); 运行提示:Fatal error: Call to undefined function: mysql_connect() 原因:mysql不支持php,解决办法: apt-get install php5-mysql
/etc/init.d/apache2 restart
apt-get install apache2 mysql-server-5.0 php5
apt-get clean
apt-get install libmysql++-dev
/etc/init.d/apache2 start
php代码如下: $link = mysql_connect("ip", "username", "password");
if(FALSE == $link)
{
echo "Connect database failed!";
}
echo "Connect database sucess!";
mysql_select_db('dbname', $link); 运行提示:Fatal error: Call to undefined function: mysql_connect() 原因:mysql不支持php,解决办法: apt-get install php5-mysql
/etc/init.d/apache2 restart
相关阅读 更多 +