Page 1 of 1

php in separate file

Posted: Fri Jun 06, 2003 12:18 pm
by tranquillo
Hi..
I've heard that in asp.net you can do the graphics in a html document and have the asp.net code in a separate file.
is this possible in php4?
if so, how do you connect them?

Posted: Fri Jun 06, 2003 4:25 pm
by bonkers
If what you're asking is if you could like...I dunno, Make a complete page in HTML, and just add little parts where you want PHP code? I mean sure! All you have to do is in your PHP code in your new file is

Code: Select all

include '../relative/path/of/whatever.html';


and it'll be included. Personally I like to have one template file, and I put variables where there is dynamic content. Then In another file, say like index.php I define $body and $header and $title, and then I include the php template file, and it puts those in... boom..

http://us2.php.net/include

Re: php in separate file

Posted: Sun Jun 08, 2003 12:31 am
by WiZARD
tranquillo wrote:Hi..
I've heard that in asp.net you can do the graphics in a html document and have the asp.net code in a separate file.
is this possible in php4?
if so, how do you connect them?

Yes you may do it cause PHP support GD library and more...

Posted: Wed Jun 11, 2003 8:40 am
by Joan Garnet
For example using inline frames <iframe>
Or with the other possible options above.