-
-
set_include_path('/xampp/htdocs/test/include'); //Please note that the '/' in php does not represent the root directory of the website, but the drive letter where the file is located, available echo realpath('/'); View
- //If the PHP version is too low, this function is not supported, you can use the general version ini_set()
/*View the real default include path*/
- echo realpath(get_include_path());
- /*To include cls.mysqli.php just need to*/
- require_once('cls.mysqli.php');
- $mysql = new Mysql('localhost','root','' ,'test'); //There are no errors in instantiation and subsequent query statements
-
Copy code
|