Browse Source

修正后台上传的错误

tags/6.1.9
tianya 1 month ago
parent
commit
9f57f2eee3
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/admin/dialog/select_templets_post.php

+ 2
- 1
src/admin/dialog/select_templets_post.php View File

@@ -30,7 +30,8 @@ if ($filename =='') {
}
$filename = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $filename));
if ($filename == '' || !preg_match("#\.(".$cfg_txttype.")#i", $filename)) {
ShowMsg("您所上传的文件存在问题,请检查文件类型是否适合", "-1");
ShowMsg("您所上传的文件存在问题,请检查文件类型是否适合", "-1");
exit();
}
$fullfilename = $cfg_basedir.$activepath."/".$filename;
move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败");


Loading…
Cancel
Save