[eluser]RaiNnTeaRs[/eluser]
Hi all, I've read the methods for uploading and zipping the files, but it doesnt work.
The uploading code is working, but I still cant zip( compress) the files.
the idea is to zip the file once , I've upload it.
This is my last code , thx
<html>
<head>
<title>Upload SUCCESS</title>
</head>
<body>
<h3>Your file was successfully uploaded!</h3>
<ul>
<?php foreach($upload_data as $item => $value):?>
<li><?=$item;?>: <?=$value;?></li>
<?php endforeach; ?>
</ul>
<?php
$descrip = $_POST['descrip'];
$fn=element('file_name', $upload_data);
$path='./storage/'.$fn;
$this->zip->clear_data();
$this->zip->read_file($path,TRUE);
//$this->zip->archive($path);
//echo "AHOOOOOOOOY : ".element('file_name',$item)."<br />";
$this->db->set('filename',$fn);
$this->db->set('description',$descrip);
$this->db->set('sender',$this->session->userdata('username'));
$this->db->insert('tabel_storage');
?>
<p><?=anchor('dojang/uploading', 'Upload Another File!'); ?></p>
<p><?=anchor('dojang/news', 'Back to Home'); ?></p>
</body>
</html>