dave25 Posted June 14, 2015 Share Posted June 14, 2015 Why i get 2 error message if it can find my file? Warning: require(includes/paginator/index1.php): failed to open stream: No such file or directory in C:\xampp\htdocs\testScript\admin\index.php on line 15 Fatal error: require(): Failed opening required 'includes/paginator/index1.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\testScript\admin\index.php on line 15 index.php <?php ob_start(); session_start(); define('testScript', 1) error_reporting(E_ALL); ini_set('display_startup_errors', 1); ini_set('display_errors', 1); ini_set('html_errors', TRUE); ini_set('log_errors', TRUE); ini_set('error_log', dirname(__FILE__).'/php-errors.log'); require 'includes/paginator/index_1.php';# Added _1 to index.php to force error. ...................... ...................... ob_flush(); ?> Link to comment https://forums.phpfreaks.com/topic/296805-one-file-inclusion-2-error/ Share on other sites More sharing options...
Ch0cu3r Posted June 14, 2015 Share Posted June 14, 2015 Why i get 2 error message if it can find my file? No. You are getting those error message because it cannot find the file. Make sure you have type the filename or file path correctly to the file you are trying to include. Link to comment https://forums.phpfreaks.com/topic/296805-one-file-inclusion-2-error/#findComment-1513852 Share on other sites More sharing options...
mac_gyver Posted June 15, 2015 Share Posted June 15, 2015 actually, the OP is triggering the error with an intentional typo in the file name. not sure what the question about this is, but the first message, the Warning, is because the file could not be found. the second message, the Fatal error: is because a require()/require_once() statement that fails also throws a fatal run-time error. Link to comment https://forums.phpfreaks.com/topic/296805-one-file-inclusion-2-error/#findComment-1513966 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.