PHP require files -


i working on website , nav looks this

enter image description here

i have primarilly made page template shared pages.the picture follows shows how tried break down template different pieces.

enter image description here

now have keep files in main directory. can't put related pages example listing pages in listing folder or download pages in download folder etc because can't access require files. have tried using .. operator template nested not helping either.

my question strategy use can use template pieces yet related files can grouped in folders rather keeping files in main directory. looks messy

thank you.

you should not put files in main directory messy , confusing.

better put required files in respective folders , call them properly.

in index.php-> okay how have included files.

but in init.php -> don't need write folder name "core" init.php inside core folder. use

require('connect.php'); 

similarly in header.php

 require('logo.php'); 

and in footer.php

require('counter.php'); 

if have problem, plz let me know.


Comments