Home >Backend Development >PHP Tutorial >Zend studio for eclipse中使php可以调用mysql相关函数的设置方法_php技巧

Zend studio for eclipse中使php可以调用mysql相关函数的设置方法_php技巧

WBOY
WBOYOriginal
2016-05-17 09:34:441010browse

如果直接调用mysql_connect会出现:Fatal error: Call to undefined function mysql_connect() 的错误
解决办法,
找到zend studio php.ini所在的位置
我的zend studio安装在D:\Program Files\
所以php.ini所在位置为:D:\Program Files\Zend\Zend Studio for Eclipse - 6.0.0\plugins\org.zend.php.debug.debugger.win32.x86_5.2.12.v20071210\resources\php5
在此文件夹中新建ext文件夹,
并copy php_mysql.dll 到此文件夹,
修改php.ini 在里面新增如下
extension_dir="D:\Program Files\Zend\Zend Studio for Eclipse - 6.0.0\plugins\org.zend.php.debug.debugger.win32.x86_5.2.12.v20071210\resources\php5\ext"
extension=php_mysql.dll
通过以上修改,问题完美解决。

Statement:
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