-1

I've a WEMP server with PHP 5.3.28 installed on a Windows Server 2003.
Everything works, except for require, I've in my script.

This is the relevant code:

<?
require('info.php');
echo 'root directory require<br>';
require('subpath/info.php');
echo 'sub directory require<br>';

The problem is that the require of the info.php located in the root directory works, but the one in the sub-directory doesn't.

The script breaks on the first require() which contains a sub-directory without throw errors.

I've checked that PHP have permissions to read the sub-directory trying with file_exists() and file_get_contents() and everything works flawlessly.

No errors are reported in the Nginx log or PHP log.
How can I fix this problem?

NB: The same script on my WEMP server installed on my workstation with Windows 7 works.

Fez Vrasta
  • 14,110
  • 21
  • 98
  • 160

1 Answers1

1

try

require 'subpath'.DIRECTORY_SEPERATOR.'info.php';
coolguy
  • 7,866
  • 9
  • 45
  • 71