has been using $_server["] array to obtain the specific information in the URL, today found that this function is more simple and powerful.
$Url"http://username:password@baidu.com/OPP/?username=admin&password=admin"; $Url = parse_url($Url); echo""; var_dump($Url); echo"
";
Run results
array(6) { ["scheme"]=> string(4"http" ["host"]=> string(9"baidu.com" ["user"]=> string(8"username" ["pass"]=> string(8"password" ["path"]=> string(5"/OPP/" ["query"]=> string(29"username=admin&password=admin"}
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the use of Parse_url to parse the details of the URL, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.