|
在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);
- }
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|