06 2021 档案
摘要:/** * @param $keywords string * @param $field string * @return array|string */ public function advance_where_or($field,$keywords) { $keywords = trim($
阅读全文
摘要:创建控制器: // Windows php artisan admin:make UserController --model=App\User app\Admin\routes.php <?php use App\Admin\Controllers\UserController; use Enco
阅读全文
摘要:String.prototype.trim = function (char, type) { if (char) { if (type == 'left') { return this.replace(new RegExp('^\\'+char+'+', 'g'), ''); } else if
阅读全文
摘要:function is_ip(ip){ let re = /^([0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.([0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.([0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\
阅读全文
摘要:function clearDomScriptTag(s) { var reg=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi; //生成相关正则信息 s = s.replace(reg, "");//忽略大小写的正则 return s;
阅读全文