nemec Posted March 20, 2006 Report Share Posted March 20, 2006 $im = imagecreatefromgif($cits_folder.$par); $das = true; $pore = 1; while (file_exists($cashe_folder.'/'.'error_'.$pore.'.gif')) { $erro = imagecreatefromgif($cashe_folder.'/'.'error_'.$pore.'.gif'); if ($erro == $im) { $das = FALSE; break; } $pore++; } if ($das) { imagegif($im, $cashe_folder.'/'.$name_file); mysql_query("INSERT INTO te_mathgraph (name,code) VALUES ('$name_file','$cod')"); } Lūdzu lieto bbtagus! (bubu)[/color] ja izveidotais IMG ir kaads errors, tad es vinju negribu saglabaat..jautaajums taads: if ($erro == $im) = man nestraadaa, kaa savaadaak??? Link to comment Share on other sites More sharing options...
Delfins Posted March 21, 2006 Report Share Posted March 21, 2006 (edited) nav cita errora... vai nu ImageHandle vai nu FALSE... būtība algoritms kaut kāds dīvains.. neizprotu jēgu Un ko vispār nozīmē $im == $erro ?? Tie tač handļi... $erro = & $im; $erro == $im -> TRUE, citos variantos laikam būs vienmēr FALSE Otrkārt, `cashe` rakstās cache Edited March 21, 2006 by Delfins Link to comment Share on other sites More sharing options...
Klez Posted March 21, 2006 Report Share Posted March 21, 2006 kkada diivaina saliidzinaashan ... nau kko citu vieglaak saliidzinaat nevis bildes ? Link to comment Share on other sites More sharing options...
nemec Posted March 21, 2006 Author Report Share Posted March 21, 2006 (edited) nu OK. Kaa es varu noteikt vai bildes ir vienaadas vai nav? (ja man ir divi handlji 'imagecreatefromgif()'). p.s. un kaada starpiiba man, kaa pareizi rakstaas cache. ||| jeega tam algoritmam: imagecreatefromgif($cits_folder.$par) = tas ir matemaatikas formulu ziimeetaajs, bet ja formulu uzraksta nepareizi, tad tas raada erroru bildi. Un savukaart, ja taa ir ERROR bilde, tad man nav vajadziibas saglabaat to cache folderiii un datubaazee nosaukumu... Es gribu cashe uztaisiit daudzaam formulaam, labi ko tur staastiit, taa pat tev tas nav vajadziigs. Edited March 21, 2006 by nemec Link to comment Share on other sites More sharing options...
Recommended Posts