Forum Moderators: coopster
In Apache, you can do something like:
DocumentRoot d:/www/
Alias /myfolder/ D:/anotherfolder/
Which means that everytime d:/www/myfolder/ is accessed, Apache takes a equivalent file out of D:/anotherfolder/.
I want to do the same with .php-files to do local testing under windows.
Under linux, you would do a symbolic link, but thats not possible in windows xp My includes are always like:
include $_SERVER["DOCUMENT_ROOT"]."/myfolder/test.php"
and I hope I don't have to change them because there a lots ;-)
I tried to extend the include_path in php.ini with "D:/anotherfolder/", but I'm not able to include anything out of this folder with that.
You still should be able to but you will have to specify the full path of the file.
No, you don't need to include the full file path with your PHP includes but your full file path(s) need to be in the include_path php.ini directive.
Symbolic links would be a solution, but something like the apache-alias-mechanism would be more easy, because you don't have to create a symbolic link for every folder.
The problem with relative/absolute pathes is, that I need absolute pathes on the server, but for local testing, I would need pathes based on the include_path in php.ini, but only if the path is not existing. Tricky, I know. I thought include_path is used when a path is not found. But that seems not to be the case.
So I guess I have to use the symbolic link solution. So thanks for the link to the resource kit.