linux下php无法使用mysql解决办法

WBOY
Release: 2016-06-13 11:55:52
Original
1075 people have browsed it

linux下php无法使用mysql
Fatal error: Call to undefined function mysql_connect() in /var/www/html/mysql.php on line 7

报这样的错

php.ini中的 extension=php_mysql.dl  也开起来了
------解决方案--------------------
extension=php_mysql.dll
??
dll是windows下的链接文件。linux下应该是so文件。
所以,你是下错php的包了吧?
------解决方案--------------------
1.执行phpinfo()函数,查看mysql是否存在。
2.linux下开启mysql的扩展是extension=mysql.so
window下是extension=mysql.dll,请加以区别。

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