2

I am trying to use a relative path locally on a Mac OSX lion using require_once:

require_once('../../folder/file.php5');

And it throws an error every time:

PHP Warning: require_once(../../folder/file.php5): failed to open stream: 
No such file or directory in - on line 6 PHP Fatal error: require_once(): 
Failed opening required '../../folder/file.php5' (include_path='.:') in - on line 6

The file and folder structure is exactly the same as the Web host and it works there with out issue.

require_once('../../folder/file.php5');

The other odd thing is I can only get the PHP error via previewing via my code editor CODA. If I load the same URL in my browser, it outputs the body of the PHP5 file as you would see it in plain text.

What causes the above Failure?

Eric Leschinski
  • 146,994
  • 96
  • 417
  • 335
uber_n00b
  • 163
  • 2
  • 12

1 Answers1

0

The error output says that your include_path is .:. I doubt it's the problem, but have you tried setting it to just .? Or putting another path after the colon? (etc, .:/some/other/path)

Litty
  • 1,856
  • 1
  • 16
  • 35