Some things although very simple, but feel if they do not do, may be a short period of time to forget, in the process of blogging is tantamount to further deepen their own impression, intend to look at the laravel of the source code, broaden their horizons
Looking at the server.php entry file, you see the following code
$uri = UrlDecode (
parse_url ($_server[' Request_uri '), Php_url_path)
);
I see after feeling a little strange, $_server[' Request_uri '] returned not all the content after the domain name, Parse_url is not used to parse the URL, why can be used to parse a string that is not a URL, so I started to test, wrote the following code
$a = '/oop?b=1 ';
$b = Parse_url ($a, php_url_path);
Var_dump ($b);
Output value is
String (4) "/oop"
When the code is
$a = '/oop?b=1 ';
$b = Parse_url ($a);
Var_dump ($b);
Output value is
Array (2) {[' Path ']=> string (4) '/oop ' [' Query ']=> string (3) ' B=1 '}
So, come on, Parse_url, this function is now not necessarily a very standard URL to return to,
After the test, I looked at the description of the function in the PHP manual.
It was repaired in the 5.4.7.
2016-11-8 22:30 Edit