This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 把从HTML源码中获取的相对路径转换成绝对路径 | |
| * @param string $url HTML中获取的网址 | |
| * @param string $URI 用来参考判断的原始地址 | |
| * @return 返回修改过的网址,如果网址有误则返回FALSE | |
| */ | |
| function filter_relative_url($url, $URI){ | |
| //STEP1: 先去判断URL中是否包含协议,如果包含说明是绝对地址则可以原样返回 | |
| if(strpos($url, '://') !== FALSE){ | |
| return $url; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * API扩展 | |
| * | |
| * Class ApiTrait | |
| */ | |
| trait ApiTrait | |
| { | |
| /** | |
| * 设置允许跨域访问的域名白名单 | |
| */ |
NewerOlder