PDA

View Full Version : Include files in PHP(liek text documents that output HTML)



Hobbes
March 24th, 2002, 15:19
What is the correct code to include a document (that contains HTML) that will display in the page you want to include it on? THx.

Who?
March 24th, 2002, 15:23
are you talking about <?php include("path/to/file"); ?>

Hobbes
March 24th, 2002, 15:30
Does that work with SSI calls too?

Dusty
March 24th, 2002, 15:35
SSI isn't PHP and won't work in a PHP file. A similar include done in SSI would be:

<!--#include virtual="path/to/file"-->

Kaliber
March 24th, 2002, 17:46
Just to clear things up PHP isn't meant to be only used for the "include" command.

Hobbes
March 25th, 2002, 00:06
I'm aware of that, but:

What is the PHP equivalent to the SSI include tag (for perl scripts) -- is there one?

invalid
March 25th, 2002, 17:15
<? include("filename.php"); ?>

that is the equivelant for the ssi include statement