swfupload上传后的文件传哪里去了 我设置了 upload.php内容如下<?php
// The Demos don't save files if (!isset($_FILES["resume_file"]) && !is_uploaded_file($_FILES["resume_file"]["tmp_name"]) && !$_FILES["resume_file"]["error"] != 0) {
echo rand(1000000, 9999999); // Create a pretend file id, this might have come from a database.
exit(0);
}
else
{
$FILE_AA = array(".jpg",".gif",".jpeg",".wmv",".rar",".avi");
$FILE_TIME = date("YmdHis",time());
$FILE_NAME = $_FILES["resume_file"]["name"];
$aa = substr($FILE_NAME,strrpos($FILE_NAME,"."));
$abs = $FILE_TIME . $aa;
$tmp=$_FILES["Filedata"]["tmp_name"];
if(function_exists("move_uploaded_file")) {
$ok = @move_uploaded_file($tmp,$abs);
} else {
$ok = @copy($tmp,$abs);
@unlink($tmp); // try to delete...
}
}
// If there was an error we don't return anything and the webpage will have to deal with it.
?>生成文件的路径 和upload.php是同级的 这样写没错吧可是 就是没有上传后的文件,请大家帮忙看看 分不够可以加
// The Demos don't save files if (!isset($_FILES["resume_file"]) && !is_uploaded_file($_FILES["resume_file"]["tmp_name"]) && !$_FILES["resume_file"]["error"] != 0) {
echo rand(1000000, 9999999); // Create a pretend file id, this might have come from a database.
exit(0);
}
else
{
$FILE_AA = array(".jpg",".gif",".jpeg",".wmv",".rar",".avi");
$FILE_TIME = date("YmdHis",time());
$FILE_NAME = $_FILES["resume_file"]["name"];
$aa = substr($FILE_NAME,strrpos($FILE_NAME,"."));
$abs = $FILE_TIME . $aa;
$tmp=$_FILES["Filedata"]["tmp_name"];
if(function_exists("move_uploaded_file")) {
$ok = @move_uploaded_file($tmp,$abs);
} else {
$ok = @copy($tmp,$abs);
@unlink($tmp); // try to delete...
}
}
// If there was an error we don't return anything and the webpage will have to deal with it.
?>生成文件的路径 和upload.php是同级的 这样写没错吧可是 就是没有上传后的文件,请大家帮忙看看 分不够可以加
if(!is_dir($FILE_TIME))
{
mkdir($FILE_TIME, 0777, true);
}
$FILE_TIME是时间串,但是不是目录 $abs = $FILE_TIME . $aa; 这句话只是 生成文件的名字
然后再看一下信息,有可能是权限问题,移动没有成功.
$ok = @move_uploaded_file($tmp,$abs);
} else {
$ok = @copy($tmp,$abs);
@unlink($tmp); // try to delete...
}