I 'm trying to connect to mysql database in my php script. I keep getting the following error:
Warning: require(mysqli_connect.php): failed to open stream: No such file or directory in C:\xampp\htdocs\simpleIdb\register-page.php on line 52
Fatal error: require(): Failed opening required 'mysqli_connect.php' (include_path='.;C:\xampp\php\pear') in C:\xampp\htdocs\simpleIdb\register-page.php on line 52
I 'm running XAMPP 5.5.30 on Windows 10.
Line 52 is: require('mysqli_connect.php');
And the following as mysqli_connect.php:
DEFINE ('DB_USER', 'horatio');
DEFINE ('DB_PASSWORD','hmsvictory');
DEFINE('DB_HOST', 'localhost');
DEFINE('DB_NAME', 'simpleIdb');
$dbcon = @mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME)
OR die ('Could not connect to MySQL:'.mysql_connect_error());
mysql_set_charset($dbcon, 'utf-8');
My include path in php.ini is:
include_path=".;C:\xampp\php\pear"
There doesn't seem to be any closure on previous discussions on this issue: