Jump to content

Filesystem path issues


akitchin

Recommended Posts

hey there,

 

i often define a system path variable with the filesystem-based path to the current working directory, like so:

 

define('SYS_PATH', '/projects/somedir/somesubdir');

 

where projects is a directory immediately below the directory set as my localhost.  this works on *nix machines, but the path seems to trump any windows machines with a "The file cannot be found" error:

 

require_once(SYS_PATH.'/includes/something.php');

 

the path echoed in the error is exactly the path to the file, and the file is there.  furthermore, the filesystem path in the $_SERVER array is the one i use in SYS_PATH, so i see no reason why it should work on *nix but not windows.

 

anyone know of some discrepancies between directory handling?  all server settings are the same, the only difference being in the OS.  i'd appreciate any help, since this makes local testing utterly useless.

Link to comment
https://forums.phpfreaks.com/topic/47932-filesystem-path-issues/
Share on other sites

  • 2 weeks later...
  • 3 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.