A main index.php for several pages / folders

advertisements

Is it possible to have a single index.php for the whole filetree?

Basically i have a folder/subPage on my website that allows filebrowsing. since i might want to change the look of the filebrowser i want to have a central index.php and have the other index.php's load the main php instead of beeing a copy of the original file.

(at the moment i have to coppy the index.php and the htaccess file in every sub folder)

what i want: a php file that loads the php file from the main folder

eg. /Files/Fileindex/index.php < the main php /files/other/.index.php < the php that should load the main php

i hope i was detailed enougth for you to understand this...

btw: i am new to stackoverflow (finaly decided to make an account)


I guess yes, but it related with using MVC pattern. Now you have multiple entry points, but mvc require single entry point and another behavior. So if you want it, you may have a look for MVC. But also for your case it might be hard move your application to completly another application structure, architecture and logic.