Initial commit

This commit is contained in:
易焱
2021-03-13 18:42:01 +08:00
commit d9a3c376d5
3243 changed files with 627198 additions and 0 deletions
@@ -0,0 +1,25 @@
<?php
/**
* $_GET 编码 解决url中文问题
* @author Administrator
*
*/
class GetcodingBehavior extends Behavior{
public function run(&$params) {
foreach ($_GET as $k=>$v){
if(!is_array($v)){
if (!mb_check_encoding($v, 'utf-8')){
$_GET[$k] = iconv('gbk', 'utf-8', $v);
}
}else{
foreach ($_GET['_URL_'] as $key=>$value){
if (!mb_check_encoding($value, 'utf-8')){
$_GET['_URL_'][$key] = iconv('gbk', 'utf-8', $value);
}
}
}
}
}
}