php parse_url()函数

时间:2014-06-02 12:47:09   收藏:0   阅读:300

parse_url()函数是将输入的URL结构分解成几个部分来将其转变为一个关联数组

组成URL的几个基本部分为:scheme(协议名),host(主机名),port(端口号),path(文件路径),query(查询参数),user(用户名),pass(密码)如:http://www.example.com/index.php?week=1#demo

scheme:http

host:www.example.com

port:80

user:

pass:

path:view.php

query:week=1

fragment:#demo

当URL是http://username:password@www.example.com的形式时,user:username,pass:password

php parse_url()函数,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!