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

From: Date: Mon, 07 Apr 2008 16:45:42 +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-272668@lists.php.net to get a copy of this message
On Mon, Apr 7, 2008 at 12:24 PM, Noah Spitzer-Williams <noahsw@gmail.com> wrote: > Here's the error I get: > > Warning: include(.\file.inc.php) [function.include]: failed to open stream: > No such file or directory in C:\Inetpub\httpdocs\test.php on line 3 > > Warning: include() [function.include]: Failed opening '.\file.inc.php' for > inclusion (include_path='.;.\includes;.\pear') in > C:\Inetpub\httpdocs\test.php on line 3 If you're going to use Windows-style paths, try escaping your slashes and see what happens. <?php include(".\\file.inc.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!

« previous php.general (#272668) next »