PHP7 Unpacked to the
folder C: \ Apps \ PHP7 . I can not start the following script:
& lt;? php $ link = mysql_connect ("LocalHost", "qwe", "qwe"); ? & gt;
I get a mistake:
Fatal Error: Uncaught Error: Call to undefined Function MySQL_CONNECT ()
As I understood the problem is that the extension for MySQL is not loaded. But to download it, you need to revive the corresponding string in the
PHP.ini file. But I could not find such a file.
2) I tried to do the following.
& lt;? php DL ('php_mysqli.dll'); $ link = mysql_connect ("localhost", "root", "root"); ? & gt;
But again got a mistake:
warning: php startup: unable to load dynamic library 'c: \ php \ php_mysqli.dll'
PHP Looking for an extension is not where it is necessary.
Help figure out.
Answer 1, Authority 100%
MySQL extension was recognized as obsolete since PHP 5.5.0 and completely removed in PHP version 7. It is time for you to go to more modern means of working with the base:
mysqli is a more modern version of the vendor-specific connector to MySQL. The functional interface of this library allows you to slightly smooth out the transition from
mysqli. Most of the
MYSQLIfunctions have signatures similar to the
mysqlfeature (for example,
MySQL_Query). However, I strongly recommend Use the object interface of this library.
pdo – library, which is a full-fledged OOP toolkit for Works with database. The interface of this library allows you to abstract from which exactly the base is work. (Although the differences in SQL syntax will still remain.)
Make sure whether the path is correct to
In this directory,