|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-10-15 17:33 UTC] requinix@php.net
-Status: Open
+Status: Feedback
[2014-10-15 17:33 UTC] requinix@php.net
[2014-12-30 10:42 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 08:00:02 2025 UTC |
Description: ------------ Using php built-in server : php.exe -S 127.0.0.1 -t c:\myWebRoot if a relative path is used in a sub-folder the server assume the root as beeing that folder (the assumed root should always be the root indicated in the command line, in this case was c:\myWebRoot, this would prevent this strange fails) took me quite a while to understand why my sites worked ok in IIS, LAMP, WAMP, any Apache server... but failed using php built-in server... As this built-in server is a excelent and useful resource, I urge you to solve this odd behaviour... for versions 5.4.x and 5.6.x Test script: --------------- no script, this will happen even with a simple HTML static page link <a> from any subfolder as you click the link (if it has a relative path, for example other html file in the same folder) php-server try to find it in root... wwwroot index.html images_folder any_image.png pages_folder page1.html page2.html if you have a link <a> in page1.html that is inside pages_folder and that link jumps to page2.html php built-in server will fail to retrive page2.html because is looking for /page2.html instead of ./page2.html the problem is that assume the current folder as root to search for relative links