Wuu Posted March 5, 2009 Report Share Posted March 5, 2009 (edited) Man vajag divus failus png un txt sagrupēt kopē uzreiz ienācā prātā doma ielikt zipā! Bet pagooglējot neko nevar saprast visi scripti tik gari! piemēram man ir fails ar nosaukumu vabole.txt un vabole.png izdot ka download viņus vienā mapē nevaru tad laikam jāsazipo ,kā to izdarīt? Edited March 5, 2009 by Wuu Quote Link to comment Share on other sites More sharing options...
marcis Posted March 5, 2009 Report Share Posted March 5, 2009 exec("zip ..."); :) Quote Link to comment Share on other sites More sharing options...
v3rb0 Posted March 5, 2009 Report Share Posted March 5, 2009 <?php $zip = new ZipArchive(); $zip->open('foo.zip',ZIPARCHIVE::CREATE); $zip->addFile('foo.txt', 'foo.txt'); $zip->addFile('foo.png', 'foo.png'); $zip->close(); ja neiet, tad http://lv.php.net/manual/en/zip.setup.php Quote Link to comment Share on other sites More sharing options...
Wuu Posted March 5, 2009 Author Report Share Posted March 5, 2009 Paldies tagad sapratu to bultiņu nozīmi "->" ,savādāk nekādi nevarēju saprast kas tas pa murgu un sagooglēt ar neko nevarēju! Quote Link to comment Share on other sites More sharing options...
Wuu Posted March 5, 2009 Author Report Share Posted March 5, 2009 Kā man piemēram pēc 2 minūtēm izdzēst šo failu? Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted March 5, 2009 Report Share Posted March 5, 2009 Visprātīgāk šim mērķim būtu izmantot crontab vai "task scheduler" skriptu, kas reizi n minūtēs izdzēš visus failus, kas vecāki par noteikto laiku. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.