请帮助我,这是我的代码:
if(isset($_POST['send'])) {
$filename =strtolower(basename($_FILES['resume']['name']));
$ext = $_FILES["resume"]["type"];
$size= $_FILES["resume"]["size"];
if (!empty($filename) && (($ext == "application/msword") ||
($ext == "application/pdf") && ($size < 500000))) {
$name = $_POST['name'];
$email_address = $_POST['email'];
$nwname=str_replace(" ","",$name);
$newfilename= substr(md5(rand() * time()),0,7);
$newfilename2 =$nwname."_".$newfilename;
if($ext == 'application/msword') {
$newname ='upload/'.$newfilename2.".doc";
} else if($ext == 'application/pdf'){
$newname ='upload/'.$newfilename2.".pdf";
}
$temp= $_FILES['resume']['tmp_name'];
echo $temp;
$move = @move_uploaded_file($temp,$newname)
or die('Updoaling error.');
echo $move;
$query = mysql_query("UPDATE saxet SET filelocation='$newname'
WHERE name='$name' AND email='$email_address'");
}
}
我的名为“ $filename
”的文件没有移动到临时文件夹。可以帮助我吗?