Jump to content

including folders and files


runnerjp

Recommended Posts

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

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.