Click to See Complete Forum and Search --> : Incuding Other pages


Lao
09-11-2005, 11:52 PM
What I'm trying to do is have a code to enter on my main page to include another page that will have text/images on it.

I think it is something like:

<?php

require(file.php);

?>

But that didn't work when I tried it. (I also tried include, but not difference).

Any help is greatly appreicated. :)

deep.dhyani
09-12-2005, 12:00 AM
try this:

include_once("file.php"); or require("file.php");

bathurst_guy
09-12-2005, 12:39 AM
make sure your path is correct and permissions on the other file

the tree
09-12-2005, 05:58 AM
I think all you did wrong was to forget the quotation marks around the file path.

chrisranjana
09-12-2005, 07:11 AM
I second that, yes if that file is in the same directory then all you did wrong was miss the quotes