I am creating an installation script with PHP for my web application. I need to check requirements at the first. One of needed items is MySQL database.
Is extension_loaded('mysql')
in PHP enough to make sure MySQL is installed on server? Or it only says about installed PHP extensions?
try this
<?php if(!mysqli_connect()){ showerror(); } ?>
this one worked for me