ddvphp/ddv-url

ddv-url php library

0.0.1 2018-03-12 17:05 UTC

This package is not auto-updated.

Last update: 2020-09-18 04:44:08 UTC


README

Installation - 安装

composer require ddvphp/ddv-url

Usage - 使用

1、urlEncode

\DdvPhp\DdvUrl::urlEncode();

2、urlEncodeExceptSlash

在uri编码中不能对'/'编码

\DdvPhp\DdvUrl::urlEncodeExceptSlash();

3、urlDecode

\DdvPhp\DdvUrl::urlDecode();

4、parse url解码[parse_url]

\DdvPhp\DdvUrl::parse();

5、build url编码[http_build_url]

\DdvPhp\DdvUrl::build();

6、parseQuery query解码[parse_str]

\DdvPhp\DdvUrl::parseQuery();

7、buildQuery query编码[http_build_query]

\DdvPhp\DdvUrl::buildQuery();

8、formatPath path格式化,去除多余/

\DdvPhp\DdvUrl::formatPath();