SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | ob_start(); | |
3 | include ("../../con/conf.php"); | |
4 | ||
5 | ?> | |
6 | ||
7 | <?php | |
8 | /*Postala Gelen Fotoğraf Değerleri Ardından Zipleme İşlemi*/ | |
9 | if ($_POST){ | |
10 | if (extension_loaded("zip")){ | |
11 | if (count($_POST["dosya"]) > 0){ | |
12 | $zip = new ZipArchive(); | |
13 | $zipAdi = time().".zip"; | |
14 | if ($zip->open($zipAdi, ZIPARCHIVE::CREATE)){ | |
15 | ||
16 | - | foreach ($_POST["dosya"] as $dosya){ |
16 | + | $url = 'http://localhost/word.php?id=1'; |
17 | - | |
17 | + | $zip->addFile($url, basename($url)); |
18 | - | $zip->addFile($dosya); |
18 | + | |
19 | - | |
19 | + | |
20 | - | |
20 | + | |
21 | header("Content-type: application/zip"); | |
22 | header("Content-disposition: attachment; filename={$zipAdi}"); | |
23 | readfile($zipAdi); | |
24 | unlink($zipAdi); | |
25 | }else { | |
26 | echo "ZIP Dosyası Bulunamadı!"; | |
27 | } | |
28 | ||
29 | }else { | |
30 | echo "ZIP Dosyası oluşturulamadı."; | |
31 | } | |
32 | }else { | |
33 | echo "Birşeyler Seçin."; | |
34 | } | |
35 | }else { | |
36 | echo "ZIP Extension Yüklü Değil."; | |
37 | } | |
38 | } | |
39 | ||
40 | ?> | |
41 | ||
42 | </body> | |
43 | </html> | |
44 | <?php | |
45 | ob_end_flush(); | |
46 | ?> |