fantomel Posted April 9, 2009 Share Posted April 9, 2009 Hello i'm having some trouble with a code it is for including pages on website..i've tested it and it gives error. if(isset($_GET['m']) && ! eregi('http://', $_GET['m']) && ! eregi('ftp://', $_GET['m'])) { $modul = $_GET['m'] . ' .php'; if(file_exists($modul)) include_once($modul); else { require_once('errors/module_error.php'); //TODO Modificat Handlerul de eroare } } Link to comment https://forums.phpfreaks.com/topic/153296-menu-includes-error/ Share on other sites More sharing options...
Mikedean Posted April 9, 2009 Share Posted April 9, 2009 Try removing the space that's before the .php. $modul = $_GET['m'] . '.php'; If that doesn't work, post the error you're getting. Link to comment https://forums.phpfreaks.com/topic/153296-menu-includes-error/#findComment-805352 Share on other sites More sharing options...
Yesideez Posted April 9, 2009 Share Posted April 9, 2009 Posting the error message you receive along with a line number helps a LOT. Link to comment https://forums.phpfreaks.com/topic/153296-menu-includes-error/#findComment-805353 Share on other sites More sharing options...
fantomel Posted April 9, 2009 Author Share Posted April 9, 2009 it doesn't include the page even if it's there... it includes the page else { require_once('errors/module_error.php'); //TODO Modificat Handlerul de eroare } it jumps to this part and includes it....even if the page i requested exists :/ the link i've made is : echo "<a href=\"index.php?m=upload\">Click here to upload</a>"; Link to comment https://forums.phpfreaks.com/topic/153296-menu-includes-error/#findComment-805394 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.