lazda144 Posted December 15, 2007 Report Share Posted December 15, 2007 man ir saadas skripts: <? 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 = 'r:/AppServ/www/recorded_demos/'; // Folder with .dem files $dl_dir = 'r:/AppServ/www/compressed_demos/'; // 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); } ?> kaa uzlikt lai vins pats automaatiski kompresee failus? Link to comment Share on other sites More sharing options...
bubu Posted December 15, 2007 Report Share Posted December 15, 2007 Ko nozīmē automātiski? Link to comment Share on other sites More sharing options...
lazda144 Posted December 15, 2007 Author Report Share Posted December 15, 2007 lai man naw katrru reizi jaiet tajaa php failaa!! vnk lai vins pats ik peec neteikta laika kompresee failus Link to comment Share on other sites More sharing options...
bubu Posted December 15, 2007 Report Share Posted December 15, 2007 Zem Windows to panāk ar Task Scheduler. Zem Linux - ar cron. Ar php šim jautājumam nu galīgi nav nekāda sakara. Link to comment Share on other sites More sharing options...
marcis Posted December 16, 2007 Report Share Posted December 16, 2007 kapēc gan tev to funkciju neizsaukt katram no jauna pievienotam failam? Link to comment Share on other sites More sharing options...
Kavacky Posted December 16, 2007 Report Share Posted December 16, 2007 Tāpēc, ka CS serveris pēc kartes maiņas nemēdz ieiet browserī un uploadot failus uz servera lapu. Link to comment Share on other sites More sharing options...
lazda144 Posted December 16, 2007 Author Report Share Posted December 16, 2007 man vnk vajag lai ik peec 30 min itkaa ieietu hltv.php vai arii uztaisiit linku kuru piespiezot neatveras lapa ne jaunaa logaa ne tajaa pasaa bet lai web domaa ka tas ir piespiests ( jataa vispaar var, es pat nevaru to taa izskaidrot ceru ka sapratiisiet) Link to comment Share on other sites More sharing options...
andrisp Posted December 16, 2007 Report Share Posted December 16, 2007 bubu jau pateica kā. attiecībā uz to otru variantu - ko nozīmē "web domā, kas tas ir piespiests" ? Link to comment Share on other sites More sharing options...
lazda144 Posted December 16, 2007 Author Report Share Posted December 16, 2007 (edited) piemeeram es uzspiezu uz linka man neatveras ne jauns logs ne arii atveras tajaa pasaa bet lai efekts buutu taads pats kaa es ieietu tajaa hltv.php Edited December 16, 2007 by lazda144 Link to comment Share on other sites More sharing options...
andrisp Posted December 16, 2007 Report Share Posted December 16, 2007 Vienkāršāks veids izveidot linku ar onclick eventu, kas kaut kādam noslēptam ifreimam src atribūtu nomaina uz to hltv.php un pēc tam returno false (lai nenotiktu pārlāde). Var arī ar xmlhttprequest objektu (ajax). Atkal links ar onclick eventu, kas fonā veic ajax pieprasījumu uz noteiktu skriptu. Link to comment Share on other sites More sharing options...
lazda144 Posted December 16, 2007 Author Report Share Posted December 16, 2007 vis buutu labi tkai es nejeedzu tik daudz!! vari iedot piemeeru Link to comment Share on other sites More sharing options...
andrisp Posted December 16, 2007 Report Share Posted December 16, 2007 vari sameklēt pats piemēru googlē viss ir Link to comment Share on other sites More sharing options...
Recommended Posts