i am trying to upload a zip file with php. but it is not uploaded to temporary folder..when i am printing the $_FILES array in the posted action , values of fields type,tmp_name becomes null and error field becomes 1 .which means file not uploaded to temporary folder... but uploading of image files becomes success..this issue is only in the case of zip files..can anyone help me please.
here is the code
encrypt-zip-file.phtml
<form action="<?php echo $this->basePath() ?>/encrypt-zip-file" method="post"enctype="multipart/form-data">
Select zip file to upload:
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" value="Upload" name="submit">
</form>
code in the action
$target_dir = $_SERVER['DOCUMENT_ROOT']."/zip_files/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file);