ngophuongtuan / url_helper
此包最新版本(v1.0.2)没有提供许可证信息。
url helper php
v1.0.2
2017-11-06 17:12 UTC
Requires
- php: >=5.6
Requires (Dev)
- phpunit/phpunit: 6.4
This package is auto-updated.
Last update: 2024-09-09 19:57:47 UTC
README
$ composer require ngophuongtuan/url_helper
用法
使用命名空间 Acme\urlHelper 包含 urlHelper 类。
use Acme\urlHelper; $url= new urlHelper();
检查有效的url。
$url->check($url); //return true if the $url is valid
连接一个url和一个路径
$url->connect("$url", "$path"); //connect the $url with $path to a new string url
获取url的信息。
$info = $url->getInfo("$url"); $protocol = $info['protocol']; //get the protocol $port = $info['port']; //get the port $domain = $info['domain']; //get the domain