|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-03-05 13:28 UTC] galacticvoid+php at gmail dot com
Description: ------------ If the trailing path that follows a script contains a dot the variable $_SERVER['PATH_INFO'] is not set. Test script: --------------- <?php echo $_SERVER['PATH_INFO']; Request to: http://locahost:8000/index.php/not.set Expected result: ---------------- /not.set Actual result: -------------- PHP Notice: Undefined index: PATH_INFO ... PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 22:00:02 2025 UTC |
Sorry I was working on this for an hour and I left out the router part. Using router.php (The only file in __DIR__ is index.php): if (file_exists(__DIR__ . '/' . $_SERVER['REQUEST_URI'])) { return false; } else { include_once 'index.php'; } The results of $_SERVER['PATH_INFO'] when calling http://localhost:8000/notset is: /notset. The results of $_SERVER['PATH_INFO'] when calling http://localhost:8000/not.set is: PHP Notice: Undefined index: PATH_INFO.