增加了realname返回,修改了文件输入参数

This commit is contained in:
Li Jianxuan 2011-11-04 07:32:03 +00:00
parent 9d86bfc6f2
commit 85fabbd5b0
1 changed files with 3 additions and 2 deletions

View File

@ -34,7 +34,7 @@ class files{
//$save_path = realpath($save_path). '/';
//有上传文件时
if (empty($_FILES) === false) {
if (empty($files) === false) {
//原文件名
$file_name = $files['name'];
//服务器上临时文件名
@ -57,7 +57,7 @@ class files{
}
//检查是否已上传
else if (@is_uploaded_file($tmp_name) === false) {
$msg['error'] = "临时文件可能不是上传文件。请重新上传";
$msg['error'] = "临时文件可能不是上传文件。或者文件类型不在允许的范围内,请重新上传";
}
//检查文件大小
else if ($file_size > $max_size) {
@ -133,6 +133,7 @@ class files{
$msg['file_url'] = $file_url;
$msg['file_size'] = $file_size;
$msg['db_path'] = $dbsave;
$msg['realname'] = $file_name;
}//检查扩展名
}//目录正确性
return $msg;