hidden moose Posted June 5, 2008 Share Posted June 5, 2008 My host updated to PHP5 not to long ago, im not too good with PHP, so here it goes. this is on my index.php page <?php error_reporting (E_ALL & ~E_NOTICE); $filename = "{$_GET['id']}"; if(file_exists($filename) && isset($_GET['id'])){ include_once $filename; } elseif (!isset($_GET['id'])) { include_once 'home.htm'; } ?> and this goes on the includes pages <?php include_once $id; ?> What do I need to change in order to get this working for PHP5? thanks! (sorry about how it's my frist post...) Quote Link to comment https://forums.phpfreaks.com/topic/108861-php5-inculde-path/ Share on other sites More sharing options...
wildteen88 Posted June 5, 2008 Share Posted June 5, 2008 Where is $id coming from? If its from the url you should use $_GET['id'] Quote Link to comment https://forums.phpfreaks.com/topic/108861-php5-inculde-path/#findComment-558492 Share on other sites More sharing options...
hidden moose Posted June 5, 2008 Author Share Posted June 5, 2008 Okay, thanks, everything works perfectly now... simple mistake Quote Link to comment https://forums.phpfreaks.com/topic/108861-php5-inculde-path/#findComment-558546 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.