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



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@xxxxxxxxx> 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/
.



Relevant Pages

  • Re: Error Message.
    ... computer back using Windows XP installation CD. ...
    (microsoft.public.windowsxp.general)
  • Re: "secret" program errors
    ... When a program has an error and closes, windows will usually ... > that error message with a red stop sign and then the error reporting ... > also seems to not like system restore, as it has never let me create ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: delayed write failed
    ... "Delayed Write Failed" error message when you manage files in Windows XP ... an increasing number of users in our organisation are receiving this ...
    (microsoft.public.windowsxp.general)
  • Re: One or more messages in your outbox do not have a valid accoun
    ... This is the rest of the error message I am receiving. ... outbox do not have a valid account specified. ... computer that is running Windows Vista" ...
    (microsoft.public.windows.vista.mail)
  • Re: Operating System Error
    ... > DRTP wrote: ... >> I started receiving the following error message on a Windows 2000 ... >> I tried to use the Windows repair options on the recovery CD but without ...
    (microsoft.public.win2000.general)