Jump to content

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


truenitin

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

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.