MeTroiD Posted November 13, 2006 Report Share Posted November 13, 2006 Tā... Sāku šodien linkt HLTV... Viss izdevaas iznemot tas skripts... Ar zipošanu... <? function zipcompressfile($source,$destination,$filename,$level=false) { $dest=$destination.$filename.'.zip'; $mode='wb'.$level; $error=false; echo $source.$filename.' -> '.$dest.'<br>'; if($fp_out=gzopen($dest,$mode)) { if($fp_in=fopen($source.$filename,'rb')) { while(!feof($fp_in)) { gzwrite($fp_out,fread($fp_in,1024*512)); } fclose($fp_in); } else { $error=true; } gzclose($fp_out); } else $error=true; if($error) return false; else return $dest; } $demo_dir = 'E:\Mans_Webs\www\demo'; // Folder with .dem files $dl_dir = 'E:\Mans_Webs\www\lejupielades\demo'; // Folder, where to put compressed files $handle = opendir($demo_dir); if ($handle) { while (false !== ($fails = readdir($handle))) { if ( preg_match("/(.*).dem/", $fails, $demo) ) { zipcompressfile($demo_dir, $dl_dir, $fails); } } closedir($handle); } ?> Kipa uztaisa tos zip failus, bet E:\Mans_Webs\www\lejupielades\demometro-0611131224-de_odigy.dem.zip šitajā folderī... + Tie faili ir nederīgi, [Pat nesakti zipot (1kb aiznem katrs no tiem)] Kad ir šitāds kods... Tad man webā rāda : E:\Mans_Webs\www\demometro-0611131224-de_odigy.dem -> E:\Mans_Webs\www\lejupielades\demometro-0611131224-de_odigy.dem.zip Warning: fopen(E:\Mans_Webs\www\demometro-0611131224-de_odigy.dem): failed to open stream: No such file or directory in e:\mans_webs\www\demo\index.php on line 10 E:\Mans_Webs\www\demometro-0611131347-de_vertigo.dem -> E:\Mans_Webs\www\lejupielades\demometro-0611131347-de_vertigo.dem.zip Warning: fopen(E:\Mans_Webs\www\demometro-0611131347-de_vertigo.dem): failed to open stream: No such file or directory in e:\mans_webs\www\demo\index.php on line 10 E:\Mans_Webs\www\demometro-0611131408-de_cpl_strike.dem -> E:\Mans_Webs\www\lejupielades\demometro-0611131408-de_cpl_strike.dem.zip Warning: fopen(E:\Mans_Webs\www\demometro-0611131408-de_cpl_strike.dem): failed to open stream: No such file or directory in e:\mans_webs\www\demo\index.php on line 10 E:\Mans_Webs\www\demometro-0611131409-de_cpl_strike.dem -> E:\Mans_Webs\www\lejupielades\demometro-0611131409-de_cpl_strike.dem.zip Warning: fopen(E:\Mans_Webs\www\demometro-0611131409-de_cpl_strike.dem): failed to open stream: No such file or directory in e:\mans_webs\www\demo\index.php on line 10 Nu tā tad jaliek šitam kodam $demo_dir = 'E:\Mans_Webs\www\demo'; // Folder with .dem files $dl_dir = 'E:\Mans_Webs\www\lejupielades\demo'; // Folder, where to put compressed files Direktorijas beigās / ... $demo_dir = 'E:\Mans_Webs\www\demo\'; // Folder with .dem files $dl_dir = 'E:\Mans_Webs\www\lejupielades\demo\'; // Folder, where to put compressed files Izdaru tā Un web lapā parādās... Parse error: parse error in e:\mans_webs\www\demo\index.php on line 30 + Nesazipojas...Kas pa sviestu??? Link to comment Share on other sites More sharing options...
de.Fault Posted November 13, 2006 Report Share Posted November 13, 2006 slinkums kodu pārlasīt, bet ko tu lieto, lai hostētu webu? iesaku pašam salikt atsevišķi visu. Link to comment Share on other sites More sharing options...
MeTroiD Posted November 13, 2006 Author Report Share Posted November 13, 2006 Man ir uz LOCALHOST AppServ v2.4.4a... Nesaprotu es no sitaa koda NEKO... Prasu jums tapec... Link to comment Share on other sites More sharing options...
r1lex Posted November 13, 2006 Report Share Posted November 13, 2006 caw metroid! vsp neiesaku likt to hltv tam ir 2 miinusi 1)Tas ljooti bremzee serveri (taisa lagus) 2)Tie demo faili aiznem diezgan daudz HDD Link to comment Share on other sites More sharing options...
DaretodreaM Posted November 13, 2006 Report Share Posted November 13, 2006 3) neviens tavā webā neliks demo , domā visiem jābūt kā gignam? Link to comment Share on other sites More sharing options...
MeTroiD Posted November 13, 2006 Author Report Share Posted November 13, 2006 ^___^ Es neteicu ka gribu kaa GIGNam... VNK... Lai normali var adminet serveri vajag to DEMO sviestu... Link to comment Share on other sites More sharing options...
B3sT Posted November 13, 2006 Report Share Posted November 13, 2006 saproti man ari nesanaaca ar zip es prosta dem failu liku tas aiznem nedaudz vairk ivetas bet vismaz viss strada!! un tad vel partaisiju ka vaig !!paskatiesHERE Link to comment Share on other sites More sharing options...
MeTroiD Posted November 13, 2006 Author Report Share Posted November 13, 2006 Ev, tev sausmigi smuks tas viewdemo.php .... Buus vien taa pat kaa tev jadara... Link to comment Share on other sites More sharing options...
B3sT Posted November 13, 2006 Report Share Posted November 13, 2006 TAD labi ! Link to comment Share on other sites More sharing options...
r1lex Posted November 13, 2006 Report Share Posted November 13, 2006 (edited) saproti man ari nesanaaca ar zip es prosta dem failu liku tas aiznem nedaudz vairk ivetas bet vismaz viss strada!! un tad vel partaisiju ka vaig !!paskatiesHERE ta ir reklaamaa vai kaa tas bija jasaprot? 3) neviens tavā webā neliks demo , domā visiem jābūt kā gignam? par so vispaar labaak neizteiksos, varbuut cilveeks vienk grib normaali valdiit par savu serveri taa kaa nekraaj postus un ej d***t Edited November 13, 2006 by r1lex Link to comment Share on other sites More sharing options...
MeTroiD Posted November 13, 2006 Author Report Share Posted November 13, 2006 r1lex Link to comment Share on other sites More sharing options...
r1lex Posted November 13, 2006 Report Share Posted November 13, 2006 (edited) r1lex Ko gribeeji? sausmigi smuks njaa sis teiciens izklausaas vislabaak Edited November 13, 2006 by r1lex Link to comment Share on other sites More sharing options...
MeTroiD Posted November 13, 2006 Author Report Share Posted November 13, 2006 Dirsaa lidejs ne? Link to comment Share on other sites More sharing options...
van Helden Posted November 13, 2006 Report Share Posted November 13, 2006 Ai meegjinat shito: <html> <head> <title>LOHI VISI ESAT VAI, KA NEKO NEMĀKAT?</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1257"> </head> <?php function zipcompressfile($source,$destination,$filename,$level=false) { $dest=$destination.$filename.'.zip'; $mode='wb'.$level; $error=false; echo $source.$filename.' -> '.$dest.'<br>'; if($fp_out=gzopen($dest,$mode)) { if($fp_in=fopen($source.$filename,'rb')) { while(!feof($fp_in)) { gzwrite($fp_out,fread($fp_in,1024*512)); } fclose($fp_in); } else { $error=true; } gzclose($fp_out); } else $error=true; if($error) return false; else return $dest; } $demo_dir = 'D:/pampampam/deminji/'; // Mape, kuraa ir .dem faili $dl_dir = 'D:/pampampam/zipinji/'; // Mape, kuraa likt saarhiveetos failus $handle = opendir($demo_dir); if ($handle) { while (false !== ($fails = readdir($handle))) { if ( preg_match("/(.*).dem/", $fails, $demo) ) { zipcompressfile($demo_dir, $dl_dir, $fails); } } closedir($handle); } ?> Link to comment Share on other sites More sharing options...
MeTroiD Posted November 13, 2006 Author Report Share Posted November 13, 2006 (edited) NOPE... Tas pats... <title>LOHI VISI ESAT VAI, KA NEKO NEMĀKAT?</title> Edited November 13, 2006 by MeTroiD Link to comment Share on other sites More sharing options...
Drumais Posted November 13, 2006 Report Share Posted November 13, 2006 iemacies meklet http://www.gign.lv/forum/index.php?showtopic=10254&hl=hltv Link to comment Share on other sites More sharing options...
B3sT Posted November 14, 2006 Report Share Posted November 14, 2006 es ak saku nevaig sazipo es tapat ieliku vinus weba! Link to comment Share on other sites More sharing options...
MeTroiD Posted November 14, 2006 Author Report Share Posted November 14, 2006 iemacies meklet http://www.gign.lv/forum/index.php?showtopic=10254&hl=hltv Pec sitā posta es arī uzzināju tos abus kodus ! Link to comment Share on other sites More sharing options...
MeTroiD Posted November 14, 2006 Author Report Share Posted November 14, 2006 UJ neee.... Izdevās... TNX .. visiem!!! Link to comment Share on other sites More sharing options...
*venceso Posted November 14, 2006 Report Share Posted November 14, 2006 es ak saku nevaig sazipo es tapat ieliku vinus weba! vajag gan sazipot! un veel vajag lai tie .dem faili kas ir sazipoti izdzeeshas aaraa! jo zip faili aiznjem daudz mazaak HDD nekaa .dem faili! P.S. kaa var uzlikt kad automaatiski ie faili izdzeshas ??? Link to comment Share on other sites More sharing options...
MeTroiD Posted November 14, 2006 Author Report Share Posted November 14, 2006 (edited) Sitais... Sazipo+Automatisi izdzesas .dem faili.... <html> <head> <title>demo</title> </head> <body> <? function zipcompressfile($source,$destination,$filename,$level=false) { $dest=$destination.$filename.'.zip'; $mode='wb'.$level; $error=false; echo $source.$filename.' -> '.$dest.'<br>'; if($fp_out=gzopen($dest,$mode)) { if($fp_in=fopen($source.$filename,'rb')) { while(!feof($fp_in)) { gzwrite($fp_out,fread($fp_in,1024*512)); [B] } [B] fclose($fp_in); } else { $error=true; } gzclose($fp_out); } else $error=true; if($error) return false; else return $dest; } $demo_dir = 'C:/demo/'; // Folder with .dem files $dl_dir = 'C:/AppServ/www/demo_zip/'; // Folder, where to put compressed files $handle = opendir($demo_dir); if ($handle) { while (false !== ($fails = readdir($handle))) { if ( preg_match("/(.*).dem/", $fails, $demo) ) { zipcompressfile($demo_dir, $dl_dir, $fails); unlink($demo_dir.$fails); } } closedir($handle); } ?> <meta http-equiv="Refresh" content="1800;URL=#" /> </body> </html> A bet kaa uzlikt Download sviesta vieaa nosaukums-0611140003-de_odigy.zip ??? Edited November 14, 2006 by MeTroiD Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now