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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.