任何人都可以看到为什么此代码无法成功执行,但是实际的mp4文件没有移动到该文件夹。.iv对所有php.ini文件进行了排序,以接受20mg以上的文件。而且也没有抛出任何错误,因此,举足轻重的举动,显然举动也是如此。但是之后的目录中没有文件。.我想不起来..
此代码是否揭示了为什么不这样做的任何原因。
也-允许访问目录... o限制/权限问题
if (!empty($_FILES['sellimage0']['name'])){
if(isset($_POST)){
if(isset($_FILES['sellimage0'])){
$errors= array();
$sellimage0_name = $_FILES['sellimage0']['name'];
$sellimage0_size =$_FILES['sellimage0']['size'];
$sellimage0_tmp =$_FILES['sellimage0']['tmp_name'];
$sellimage0_type=$_FILES['sellimage0']['type'];
//print_r($_FILES['sellimage0']['name']);
$sellimage0_ext = pathinfo($_FILES['sellimage0']['name'], PATHINFO_EXTENSION);
//$sellimage0_ext=strtolower(end(explode('.',$_FILES['sellimage0']['name'])));
$expensions= array("mp4","ogg","webm");
if(in_array($sellimage0_ext,$expensions)=== false){
$errors[]="extension not allowed, please choose a MP4, OGG, or WEBM formats...";
}
if($sellimage0_size > 800000000){
$errors[]='File size must be excately 800 MB';
}
//print_r($sellimage0_tmp); exit;
if (move_uploaded_file($sellimage0_tmp,"../images/searchimages/".$sellimage0_name)); {
$uploadfile="../images/searchimages/".$sellimage0_name;
$i0url=$uploadfile;
if(empty($errors)==true){
echo $uploadfile;
}
else{
print_r($errors); die();
}
}
}
}
} else {$i0url='';}