runnerjp Posted May 24, 2008 Share Posted May 24, 2008 at the moment i have this <? $page = $_GET['page']; if (ereg('[A-Za-z0-9]',$page) ) { if (file_exists('include/'.$page.'.php')) { include('include/'.$page.'.php'); } else { include('include/main.php'); } } else { include('include/main.php'); }?> but i would also like to add my forum to this code which is forum/$page.'.php' is this possible or will i have to include all my forum files to include Link to comment https://forums.phpfreaks.com/topic/107124-including-folders-and-files/ Share on other sites More sharing options...
runnerjp Posted May 25, 2008 Author Share Posted May 25, 2008 bmp Link to comment https://forums.phpfreaks.com/topic/107124-including-folders-and-files/#findComment-549408 Share on other sites More sharing options...
Wolphie Posted May 25, 2008 Share Posted May 25, 2008 Many forum and CMS systems have certain requirements and dependencies, therefore it may not work. However, using an iframe would be best. Link to comment https://forums.phpfreaks.com/topic/107124-including-folders-and-files/#findComment-549414 Share on other sites More sharing options...
runnerjp Posted May 25, 2008 Author Share Posted May 25, 2008 nooo iframe is bad option, i hate using it as it can cause bigger problems in the long run... the code allready works but there must be sum way in witch to do 1 thing and also the other Link to comment https://forums.phpfreaks.com/topic/107124-including-folders-and-files/#findComment-549415 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.