php 未捕获的错误:调用未定义的函数 mysql_connect()

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34599244/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 00:06:58  来源:igfitidea点击:

Uncaught Error: Call to undefined function mysql_connect()

phpmysqlserverconnect

提问by Amar Muratovi?

Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\phoenixproject\register.php:9 Stack trace: #0 {main} thrown in C:\xampp\htdocs\phoenixproject\register.php on line 9

未捕获的错误:调用 C:\xampp\htdocs\phoenixproject\register.php:9 中未定义的函数 mysql_connect() 堆栈跟踪:#0 {main} 在第 9 行的 C:\xampp\htdocs\phoenixproject\register.php 中抛出

How to solve this??

这个怎么解决??

采纳答案by Stone Deft

It is most likely MySql extensions are not being loaded. Open your php.ini file and check if extension=php_mysql.dlland extension=php_mysqli.dllis uncommented

很可能没有加载 MySql 扩展。打开您的 php.ini 文件并检查extension=php_mysql.dllextension=php_mysqli.dll是否取消注释