Re: include ("foo.php") not working
| From: | maatt | Date: | Wed, 25 Jul 2001 12:52:12 +0000 |
| Subject: | Re: include ("foo.php") not working | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-59530@lists.php.net to get a copy of this message | ||
Errr... feel embaressed asking but I've done the same...
You do have <?php ?> tags around your code? Easy to leave off when there's
no HTML in the page.
Matt
"Ilari Kaartinen" <ilari.kaartinen@phpoint.net> wrote in message
news:200107251221.PAA27440@phpoint.net...
> > when I include the statement <? include ("foo.php"); ?> then rather than
> > parsing the file and displaying the results the whole file is just
dumped to
> > screen as a text file. Interesting the same problem occurs whatever the
> > file extension so the same thing happens for foo.htm, foo.html and
foo.txt!
>
> From PHP manual:
>
> The require() statement replaces itself with the specified file, much like
the C preprocessor's #include works.
>
> --
> - Castus Ilarius, Magister Ludi Machinationis