Re: Include fails when "./" is in front of file name

From: Date: Mon, 07 Apr 2008 15:24:18 +0000
Subject: Re: Include fails when "./" is in front of file name
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-272641@lists.php.net to get a copy of this message
Philip Thompson wrote:
On Apr 7, 2008, at 9:36 AM, Daniel Brown wrote:
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?
It's Windows. From experience, I know that it provides little to no error reporting in some instances. For example, if you're missing a semi-colon and you have error reporting turned on, all you get is a blank page - no other info. So, odds are is that he isn't receiving an error message.
I'm not sure where you got that from, error reporting does not differ between Windows and other platforms except where platform-specific differences exist in the implementation (of which there are few). What you're experiencing is probably the effect of the display_errors configuration option. Look it up in the manual for details. To the OP: Check that your include_path contains '.', if it doesn't add it and see if that fixes your problem. -Stut -- http://stut.net/

« previous php.general (#272641) next »