Re: Include Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shaun wrote:
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?

What is the very first file that loads?

Is it actually: /home/m/y/mysite/public_html/cms/news/index.php

Or maybe something higher up like: /home/m/y/mysite/public_html/cms/index.php that then includes the file above.

In the first case, this will work if the file is there:
include(dirname(dirname(__FILE__)).'/templates/footer.php');

In the second case, this:
include('templates/footer.php');

-Shawn

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux