|
Posted by NC on 10/06/41 11:26
David wrote:
>
> Can I include a PHP file from a file that has been included.
Yes.
> From the example below, I have a start PHP page with an include to a
> type of template page, and from page 2, I include a 3rd page. The
> first include works, but the page 3 is brought in as standard text.
Well, I am surprised anything is including at all... Take a look:
> (Page2)
> <html>
> <head>
> <title>Sans Titre</title>
> <meta http-equiv="content-type" content="text/html;
> charset=iso-8859-1" />
> <meta name="generator" content="HAPedit 3.1">
> </head>
> <body bgcolor="#FFFFFF">
> <?
> // Your code here
> echo "<hr />\n".
> "HAPedit 3.1.11.111 (September 2005 7:03:30 PM)<p>";
> ?>
> requires("page3.php");
> </body>
> </html>
First of all, it it not requires(), but require(). Second, your
require() statements is outside of any PHP block and inside an
HTML block; it shouldn't have been executed at all...
Cheers,
NC
Navigation:
[Reply to this message]
|