Jump to content

Warning: main(\index.php?page_file=mainlogin.php): failed to open stream



Recommended Posts

Hiii

i get the following error
when i clik on

<li><a href="index.php?page_file=mainlogin">Login</a></li> the link i wrote in my menu item

error:


Warning: main(\index.php?page_file=mainlogin.php): failed to open stream: Invalid argument in c:\program files\easyphp1-8\www\index.php on line 16

Warning: main(): Failed opening '\index.php?page_file=mainlogin.php' for inclusion (include_path='.;C:\PROGRA~1\EASYPH~1\\php\pear\') in c:\program files\easyphp1-8\www\index.php on line 16

when i run this code:


<?php

$full_path = getenv("REQUEST_URI");
$root = dirname($full_path);
$page = basename($full_path);
if (strpos($page,"..")) {
    die("Bad page request");
}

if (!$page) $page = "index";
$content_file=$root."".$page.".php";

echo "this is full path".$content_file;

include("header.php");
include($content_file);
include("footer.php");

?>


is it something to do with setting of default paths to search for files?????

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