Re: Include fails when "./" is in front of file name
| From: | Daniel Brown | Date: | Mon, 07 Apr 2008 14:36:43 +0000 |
| Subject: | Re: Include fails when "./" is in front of file name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-272631@lists.php.net to get a copy of this message | ||
On Sun, Apr 6, 2008 at 5:17 PM, Noah Spitzer-Williams <noahsw@gmail.com> wrote:
> This works:
> include("file.inc.php");
>
> This doesn't:
> include("./file.inc.php");
That's pretty vague, Noah. Is it unable to locate the file?
What's the error message you're receiving?
Also, what happens if you create two simple files in the same
directory like so:
<?php
// file1.php
echo "Okay.\n";
?>
<?php
// file2.php
include(dirname(__FILE__).'/file1.php');
?>
--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!