首页 > 代码库 > PHP Fatal error: Call to undefined function mysql_pconnect()

PHP Fatal error: Call to undefined function mysql_pconnect()

wKioL1N14O2BhTq3AANbPigj9fg833.jpg

[root@qy caishenye]# tail -f /data/caishenye/sa_9_0.log


PHP Warning:  mkdir(): No such file or directory in /data/caishenye/sa_9_0.php on line 18

PHP Fatal error:  Call to undefined function mysql_pconnect() in /data/caishenye/sa_9_0.php on line 25

Interactive mode enabled


PHP Warning:  mkdir(): No such file or directory in /data/caishenye/sa_9_0.php on line 18

PHP Fatal error:  Call to undefined function mysql_pconnect() in /data/caishenye/sa_9_0.php on line 25

Interactive mode enabled


PHP Fatal error:  Call to undefined function mysql_pconnect() in /data/caishenye/sa_9_0.php on line 25


解决方法:

PDO, MYSQL, MYSQLI 都可以连接mysql,使用方式也有区别的
centos下php没有mysql扩展的话你可以直接yum install php-mysql;

本文出自 “漫漫长路” 博客,谢绝转载!