zip file upload !


HOME ยป PHP

Hi,

Can anybody guide me to solve this proble. I have to upload the zip file to the webserver. The php script should read the name of the zipfile and print it and also it should read the name of the text files that are zipped and the contents in the text file.

Also is there anyway to zip the files and make it available for downlaod using the php

Thanks in advance.


Related to : zip file upload !
zip file upload
PHP
Hi,
I am using the following code to upload files limited to zip or rar, upon upload I have it set to rename the uploaded files to the id of the record placed in the database adding the file extension onto that.
Problem is that it leaves the file extension off ie
1
2
etc
etc
no file extension on the uploaded file.
also when it inserts the data (filename) into the database the file extension is marked as ie
1.x-zip-compressed
2.x-zip-compressed
I am wanting to have a page that allows people to download the files using links and need the file extensions to be ie
1.rar
Upload zip file larger then 10 M
PHP
Help me... give me some light
I play around with the upload code and try uploading image zipped file, the size larger than 10 Megabyte and it always return below code when uploading ( actually it doesn't upload the picture the text below immediately appear )
Request Entity Too Large
The requested resource
/lh_manager/ajax/ajax_photo.php
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.
Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g Server at localhost Port 80
I already set the setting in php.ini for the post and upload to 50M a
zip file upload !
PHP

Hi,

Can anybody guide me to solve this proble. I have to upload the zip file to the webserver. The php script should read the name of the zipfile and print it and also it should read the name of the text files that are zipped and the contents in the text file.

Also is there anyway to zip the files and make it available for downlaod using the php

Thanks in advance.


upload file than zip and put it for download
PHP

I want let user upload their resume on the server,these file can be every suffix,then i will zip these file and put them for other users to download by a link,is it safe enough???!!! here is my code

$nameFile = $_FILES['file']['name'];
$tmpName = $_FILES['file']['tmp_name'];
$download_folder = "/download/";
$zip = new ZipArchive;
$fileconpress = $download_folder.$nameFile.".zip";

$conpress = $zip->open($fileconpress, ZIPARCHIVE::CREATE);
if ($conpress === true)
{
    $zip->addFile($tmpName);
    $zip->close();
    echo $fileconpress."<br/>";exit();
//return $name;
}
else echo " Oh No! Error";

can not upload zip file with php
PHP

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);

Upload file then zip them [duplicate]
PHP

This question is an exact duplicate of:

I want to let users to upload their resume,actually i don't know what are they going to upload on our server,Now i decide to zip their file befor uploaded on our server,I use laravel. if somebody know,help me to understand what the best way is for doing that?best regard



Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .