I receive a blank page when I try connect to mysql, based on the error. php doesn't like the 3rd line
$link = "SELECT * FROM `Table` WHERE `id`='$id'";
$results = mysqli_query($db,$link);
$qdata = mysqli_fetch_array($results);
This code is working on my old server, so mysqli_fetch_array
seems absolute? Or did I miss something else on my php config?
Thanks!
This is the error message Fatal error: Call to undefined function mysqli_connect() in /opt/php_script/connect.php on line 14
Line 14 is
$link = "SELECT * FROM `Table` WHERE `id`='$id'";
Your mysqli
extendion is not enabled. Check your php.ini
, go to the extensions part and enable it.
This means the build of PHP you are using does not have mysqli
support. You will have to recompile PHP with mysqli support (on Linux) or add the php_mysqli.dll
extension to your php.ini
file on Windows.
See Installation - mysqli on PHP.net for more information.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.