Lee-Bartlett
asked on
Template wrapping and implodes
Im not to sure how this works, i been seeings pieces of code on this and im still at a loss why this is used instead of includes. This is the type of pieces of codes i been looking at
$page1 = implode("", file("../templ/members/hea der.htt")) ;
$page2 = implode("", file("../templ/footer.htt" ));
$pagads = implode("", file("../templ/ads.htt"));
Is it used like this? theres a template file, that file is put onto a page then you call these 3 files which already have the postioning in a differnt file. Is it somthing like this?
$page1 = implode("", file("../templ/members/hea
$page2 = implode("", file("../templ/footer.htt"
$pagads = implode("", file("../templ/ads.htt"));
Is it used like this? theres a template file, that file is put onto a page then you call these 3 files which already have the postioning in a differnt file. Is it somthing like this?
ASKER
Im still a little confused, are these varibles stored in like a functions folder or somthing. if you got a link to a page which explains the structuer, any more information would be greate
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ty to my first question, i mean, if i wanted to use the file for like 9 pages i would be able to use the implode that file onto my page
that is just putting the contents of header.htt into the variable $page1. It does NOT automatically send the content to the browser. So, somewhere down the line it must explicitly be doing:
echo $page;
or perhaps is extracting some portion of the page only and echoing only the desired portion. The same applies to $page2 and $pageads