peterpostmann/resolve_uri 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

peterpostmann/resolve_uri

Composer 安装命令:

composer require peterpostmann/resolve_uri

包简介

Resolves relative urls, like a browser would

README 文档

README

Software License Build Status

Resolves relative urls, like a browser would.

This function returns a new URI based on base path (RFC3986 URL, URN, Windows path, relative path or file) and a new path.

Install

Via Composer

composer require peterpostmann/resolve_uri

If you dont want to use composer copy the resolve_uri.php file and from [peterpostmann\php-parse_uri][2] the parse_uri.php file and include it into your project.

Usage

use function peterpostmann\uri\resolve_uri;

string resolve_uri ( string basePath, string newPath) 

Example

parse URIs

use function peterpostmann\uri\resolve_uri;

echo resolve_uri('http://a/b/c/d;p?q#x',    'x')."\n";
echo resolve_uri('C:\path\file1.ext',       'file2.ext')."\n";
echo resolve_uri('file://smb/path/to/file', '/new/path/x.ext')."\n";

The above example will output:

http://a/b/c/x
C:\path\file2.ext
file://smb/new/path/x.ext

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 47
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固