The problem
Uncaught Error: Call to undefined function mysql_connect()
why
In PHP 5+, you can use both mysql_connect() and mysqli_conncet() instead of mysqli_conncet().
The solution
In the PHPStudy environment, you can downgrade the PHP version by selecting the PHP5 + version.
>
> p>
Web site – & gt; Management – & gt; PHP version. (You can choose to replace an older version of PHPStudy.)
If you want to use php7 without changing the code, you can use the admin ->; For PHP extensions, check the box before php_mysql.
Read More:
- Fatal error: Uncaught Error: Call to undefined function mysql_ Connect() problem solving
- Fatal error: Uncaught Error: Call to undefined function mysql_connect()
- Uncaught Error: Call to undefined function mysql_select_db()
- PHP connection to MySQL database error: call to undefined function MySQL_ connect()
- Call to undefined function mysql_ Connect() solution summary
- PHP connection PostgreSQL error call to undefined function PG_ connect()
- Call to undefined function oci_ Connect() problem solving
- bug-JAVA call SAP function Connect to SAP gateway failed
- PHP error: call to undefined function curl_ init() window
- MySQL Workbench Failed to Connect to MySQL at 127.0.0.1:3306 with user root Bad handshake
- Fatal error: Call to a member function bind_param() on a non-object in
- php mysqli_ connect_ Error () and mysqli_ connect_ The difference of errno() function
- MySQL: if the remote connection using navicatip fails, prompt “is not allowed to connect to this MySQL server”
- The MySQL service suddenly hangs up with the error message can’t connect to MySQL server on ‘localhost’ (10061)
- It can’t connect to local MySQL server through socket ‘/ tmp/ mysql.sock ‘(2) “;
- 【ERROR_2】Call to a member function bind_param() on a non-object
- Building OpenGL environment
- Navicat for MySQL error 1251 failed to connect to MySQL
- Sqlog can’t connect to MySQL (1045 error)
- Uncaught type error: cannot read property ‘MSIE’ of undefined