Using UNIX paths on a Windows box
Posted: 14. December 2006 17:58
DocumentRoot is 'D:\Webs'
A PHP script requires the bootstrap.php file to be included.
This does not work: require '/Zoek.net/cake/bootstrap.php';
This works fine: require 'D:\Webs\Zoek.net\cake\bootstrap.php';
The problem is that all paths are - and should remain - like '/Zoek.net/cake/bootstrap.php' because the production server is a Linux box. I want to be able to test it on my Windows box without having to change all paths though. Does anyone have a suggestion on how to accomplish this?
The error produced by require '/Zoek.net/cake/bootstrap.php':
When I try to enter this include path as a regular URL (http://localhost/Zoek.net/cake/bootstrap.php), the page loads, so it's certain that the path is correct...
A PHP script requires the bootstrap.php file to be included.
This does not work: require '/Zoek.net/cake/bootstrap.php';
This works fine: require 'D:\Webs\Zoek.net\cake\bootstrap.php';
The problem is that all paths are - and should remain - like '/Zoek.net/cake/bootstrap.php' because the production server is a Linux box. I want to be able to test it on my Windows box without having to change all paths though. Does anyone have a suggestion on how to accomplish this?
The error produced by require '/Zoek.net/cake/bootstrap.php':
- Code: Select all
Warning: require(/Zoek.net/cake/bootstrap.php) [function.require]: failed to open stream: No such file or directory in D:\Webs\Zoek.net\public_html\test\index.php on line 81
When I try to enter this include path as a regular URL (http://localhost/Zoek.net/cake/bootstrap.php), the page loads, so it's certain that the path is correct...