Re: Include error on website
| From: | shimi | Date: | Fri, 07 Feb 2003 14:17:03 +0000 |
| Subject: | Re: Include error on website | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-15571@lists.php.net to get a copy of this message | ||
do you have register_globals on in php.ini?
because if you don't, that's not to way to get DOCUMENT_ROOT...
$_SERVER["DOCUMENT_ROOT"] would be the correct way to do it.
On Thu, 6 Feb 2003, Matt Rakes wrote:
> Dear Sir or Madam:
> I am developing a site that uses includes for my header. The header
> displays correctly on root level pages, but receives the following
> errors when pages are one or more levels deep. I have also tried using
> require and receive the same result. Here are some specs that you may
> find handy. Server is Red Hat 7.3, Apache 1.3.27, PHP 4.2.3, MySql,
> Mod_SSL 0.96b. Websites are virtual with virtual IP. I'm at a loss for
> what is wrong. Could you please help with the following error? Thanks
> in advance for your time and help.
>
> Error Message on page:
> Warning: main(/logo.php) [function.main]: failed to create stream: No
> such file or directory in /web/testnet.hrmc.org/communications/index.php
> on line 10
>
> Warning: main() [function.main]: Failed opening '/logo.php' for
> inclusion (include_path='.:/usr/local/lib/php') in
> /web/testnet.hrmc.org/communications/index.php on line 10
> Something goes here for communications
>
> Code:
> <?php
> include ($DOCUMENT_ROOT . '/logo.php');
> ?>
>
> Attached is the php.ini file
>
> Matthew Rakes
> Network Specialist
> CNA, Network+, A+
> 606-886-7753
> mrakes@hrmc.org
>
--
Best regards,
Shimi
----
"Outlook is a massive flaming horrid blatant security violation, which
also happens to be a mail reader."
"Sure UNIX is user friendly; it's just picky about who its friends are."