 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
lyubo1
Joined: 03 Nov 2008 Posts: 1
|
Posted: Mon Nov 03, 2008 4:35 pm Post subject: Upload and Archive file with Archive_tar |
|
|
Hallo!
I load file of a form
| Code: | <form enctype="multipart/form-data" action="" method="POST">
Choose a file to upload: <input name="upload" type="file" /><br />
<input type="submit" value="Upload File" />
</form> |
and PHP code
| Code: |
$name = $_FILES['upload']['name'];
$file = $_FILES['upload']['tmp_name'];
$filename = "$name" . '.tar.gz';
require_once ('Archive/Tar.php');
require_once 'PEAR.php';
$tar = new Archive_Tar("uploads/$filename", true);
$tar->setErrorHandling(PEAR_ERROR_PRINT);
$tar->create("$file") or die("Could not create archive!");
|
I did adjustment ini_set: upload_max_filesize = 100M
When I load big file, the empty archive is made.
Does somebody have got an ideaБ |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Mon Nov 03, 2008 6:07 pm Post subject: |
|
|
| The 'post_max_size' (IIRC) and 'memory_limit' settings could also be the problem. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|