Re: Include Problem
| From: | Shaun | Date: | Sat, 15 Apr 2006 20:14:07 +0000 |
| Subject: | Re: Include Problem | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-234054@lists.php.net to get a copy of this message | ||
$_SERVER['DOCUMENT_ROOT'] = /home
this isnt the correct path for the file!
""Chrome"" <admin@chrome.me.uk> wrote in message
news:005001c660c0$b6f11cc0$0201a8c0@wraith...
> Try
>
> include($_SERVER['DOCUMENT_ROOT'] . "/cms/templates/footer.php");
>
> maybe?
>
> Dan
>
> -------------------
> http://chrome.me.uk
>
>
> -----Original Message-----
> From: Shaun [mailto:shaunthornburgh@hotmail.com]
> Sent: 15 April 2006 20:05
> To: php-general@lists.php.net
> Subject: [PHP] Include Problem
>
> Hi,
>
> I am having problems with an include statement, i am using the following
> statement in an effort to include a footer file on my page:
>
> include("/cms/templates/footer.php");
>
> However I get the following error:
>
> Warning: main(/cms/templates/footer.php): failed to open stream: No such
> file or directory in /home/m/y/mysite/public_html/cms/news/index.php on
> line
> 38
>
> Warning: main(/cms/templates/footer.php): failed to open stream: No such
> file or directory in /home/m/y/mysite/public_html/cms/news/index.php on
> line
> 38
>
> Warning: main(): Failed opening '/cms/templates/footer.php' for inclusion
> (include_path='.:/lib/php') in
> /home/m/y/mysite/public_html/cms/news/index.php on line 38
>
> The file is definitely there, the script just doesn't seem to be picking
> it
> up, has anyone else had this problem?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> __________ NOD32 1.1490 (20060415) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com