Click to See Complete Forum and Search --> : Embedding PHP into document


satchmo
05-15-2003, 03:26 PM
Hi!
This might be one of the easiest questions to answer for you, but I'm not that into PHP yet so bear with me.

How do I use a specific PHP-document that I edit and that the HTML-document then reads from and puts the code into the page so that I dont do my editing in the HTML-document.

Should I be more specific?

Ask if you dont understand.

Thanks.

pyro
05-15-2003, 03:31 PM
First of all, any page that uses PHP must have a .php or .php4 extention.

To include pages, you uses this:

<?PHP include("yourfile.php"); ?>

Also, this will just include the exact text in that file into the current one, so in yourfile.php, you exclude elements such as <html>, <head>, etc...

satchmo
05-16-2003, 03:34 AM
thanks a bunch... i'll figure the rest out.

i'll get back here if i dont know what to do =)