JREAM Posted January 21, 2010 Share Posted January 21, 2010 I recently re-installed WAMP, and im not sure why this is happening.. DEFINE('root', dirname(__FILE__). '/'); echo root; Outputs: C:\Workspace\project_1/files/ Previously it would list like: http://workspace/project_1/files/ According to my localhost it's in. Does anyone know why this is? Quote Link to comment Share on other sites More sharing options...
teamatomic Posted January 21, 2010 Share Posted January 21, 2010 I'd dont worry about it because apache will take /workspace/project_1/files/ on either OS. I put the actual cause to a windows gateism. HTH Teamatomic Quote Link to comment Share on other sites More sharing options...
gizmola Posted January 21, 2010 Share Posted January 21, 2010 I doubt seriously it ever included http:// ... __FILE__ is suppossed to be the "The full path and filename of the file. If used inside an include, the name of the included file is returned. Since PHP 4.0.2, __FILE__ always contains an absolute path with symlinks resolved whereas in older versions it contained relative path under some circumstances." If you're using this for includes, then it really doesn't matter what it is, so long as it resolves correctly. PHP is suppossed to do the right thing on windows regardless of whether or not the path seperator is "/" or "\" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.