

PHP判断URL的合法性,是否为URL链接
方法 一:使用正则表达式<?php
function is_url($url){
$r = "/http[s]?:\/\/[\w.]+[\w\/]*[\w.]*\??[\w=&\+\%]*/is";
...
php 判断图片文件的真实类型
代码:<?php
/**
* 检测文件的真实类型
* @param string $srcPath 文件路径
* @return string $realType 文件真实类型
*/
$imgurl =...
让Json更懂中文(JSON_UNESCAPED_UNICODE)
php格式化json的函数json_encode($value,$options)其中有2个比较常用到的参数JSON_UNESCAPED_UNICODE(中文不转为unicode ,对应的数字 256)JSON_UNESCAPED_...
