php in separate file

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
tranquillo
New php-forum User
New php-forum User
Posts: 74
Joined: Sun Nov 24, 2002 6:48 pm
Location: katrineholm

Fri Jun 06, 2003 12:18 pm

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?
-------
stefan
-------

bonkers
New php-forum User
New php-forum User
Posts: 45
Joined: Wed Mar 12, 2003 7:17 pm

Fri Jun 06, 2003 4:25 pm

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

User avatar
WiZARD
Moderator
Moderator
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Sun Jun 08, 2003 12:31 am

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...
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image

User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Wed Jun 11, 2003 8:40 am

For example using inline frames <iframe>
Or with the other possible options above.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests