解决PHPDisk 6.5.0 V-Core在上传的时候添加tag,和描述无效的问题
在modules/upload.inc.php文件里
找到$file['name'] = $db->escape($file['name']);
在后面添加以下代码即可
$tag_arr = gpc('tag','P',array());
$desc_arr = gpc('desc','P',array());
foreach($tag_arr as $v){
$tags = $db->escape($v);
if(!is_utf8()){
$tags = convert_str('utf-8','gbk',$tags);
}
}
foreach($desc_arr as $v){
$file_description = $db->escape(cutstr($v,3000));
if(!is_utf8()){
$file_description = convert_str('utf-8','gbk',$file_description);
}
}
if($tags){
$tags = str_replace(',',',',$tags);
$tags = str_replace(',,',',',$tags);
$tags = (substr($tags,-1) ==',') ? substr($tags,0,-1) : $tags;
$tag_arr = explode(',',$tags);
} 顶起:victory: utf8也支持吗?
页:
[1]