本文主要是介绍Fatal error: Uncaught Error: Call to undefined function mysql_connect() in F:\wamp\apache\htdocs\ind,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题:
学习PHP时候,测试apache是否加载PHP中的拓展,再index.php输入如下代码:
<?php
//phpinfo();
mysql_connect('localhost:3306','root','123456' );
结果打开页面出现错误,;如下:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in F:\wamp\apache\htdocs\index.php:3 Stack trace: #0 {main} thrown in F:\wamp\apache\htdocs\index.php on line 3
解决办法:将mysql_connect()改写为mysqli_connect()
<?php
//phpinfo();
mysqli_connect('localhost:3306','root','123456' );
这篇关于Fatal error: Uncaught Error: Call to undefined function mysql_connect() in F:\wamp\apache\htdocs\ind的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!