Call to undefined function mysql_connect

后端 未结 13 765
小蘑菇
小蘑菇 2020-12-03 11:06

I just installed PHP and Apache on my home PC. When I try to call function mysql_connect I get:

fatal error: call to undefined function mysql_co         


        
13条回答
  •  臣服心动
    2020-12-03 11:11

    Since mysql_connect This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used. by default xampp does not load it automatically

    in your php.ini file you should uncomment

    ;; extension=php_mysql.dll
    

    to

    extension=php_mysql.dll
    

    Then restart your apache you should be fine

提交回复
热议问题