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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

~Phil

   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');
?>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux