Jump to content

one file inclusion 2 error


dave25

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.