Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 12-12-2008, 10:45 AM zip file php script
Novice Talker

Posts: 10
Trades: 0
can someone help me with a php script which can zip a normal file which user enters and allows the user to download the zip file....
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
jakesjohn is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-12-2008, 11:53 AM Re: zip file php script
Andy Pugh's Avatar
Extreme Talker

Posts: 203
Name: Andy
Location: N.Ireland
Trades: 0
Hi,
I haven't done this personally, however, if you have a look at http://uk.php.net/manual/en/function...ve-addfile.php, you can view some good examples, these would just need modified to fit what you need...

That's probably the closest example you could have...

PHP Code:
  <?php
$zip 
= new ZipArchive;
if (
$zip->open('test.zip') === TRUE) {
    
$zip->addFile('/path/to/index.txt''newname.txt');
    
$zip->close();
    echo 
'ok';
} else {
    echo 
'failed';
}
?>
__________________

Please login or register to view this content. Registration is FREE
Andy Pugh is offline
Reply With Quote
View Public Profile
 
Old 12-12-2008, 01:06 PM Re: zip file php script
Novice Talker

Posts: 10
Trades: 0
it is written in site itself that it wont work
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
jakesjohn is offline
Reply With Quote
View Public Profile
 
Old 12-15-2008, 04:36 AM Re: zip file php script
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
exec("zip '{$path_to_zipfile}' '{$path_to_userfile}'");
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 12-16-2008, 09:27 PM Re: zip file php script
Super Talker

Posts: 143
Trades: 0
I am just curious what you are going to use this for on your site. I guess I can think of a couple things, but I was wanting to know how it was going to be integrated into your web page.
__________________

Please login or register to view this content. Registration is FREE
specialk is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to zip file php script
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22906 seconds with 12 queries