Answer the question
In order to leave comments, you need to log in
Why does it show an error on the hosting if everything is fine on the local server?
On the local server - OpenServer everything works fine. Today I posted the site for hosting, it shows an error:
Fatal error: Call to undefined function mysqli_fetch_all() in /home/virtwww/.../http/core/models/news.php on line 16
And commented on the function on this line, the error showed elsewhere with the same function.
I don't know if it will help, but here is the code
function getNewsMain(){
$sql = "SELECT * FROM news ORDER BY rating DESC LIMIT 5";
// return mysqli_fetch_all(selectData($sql), MYSQLI_ASSOC);
}
Answer the question
In order to leave comments, you need to log in
phpinfo(); We look at which modules are enabled, especially pay attention to the modules that are disabled, in particular - go to the hosting control panel and enable mysqli (mysqlnd) in the php settings. Also see the current PHP version, on older ones use fetch_assoc();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question