cucumber Posted April 16, 2007 Report Share Posted April 16, 2007 Es taisu es ierakstu bildes tadus no datu bazes, ar sho metodi, bet pec ta man pazud php mainigie. Kur var but vaina? $a = "abc"; ob_start(); // start a new output buffer imagejpeg($resize,"",$quality); $ImageData = addslashes(ob_get_contents()); ob_end_clean(); echo $a; //nekas nav Link to comment Share on other sites More sharing options...
Joyride Posted April 16, 2007 Report Share Posted April 16, 2007 ob_end_clean() funkcija atgriez output bufera saturu un "izsledz" output buffering. Link to comment Share on other sites More sharing options...
cucumber Posted April 16, 2007 Author Report Share Posted April 16, 2007 (edited) Izdorot ta $ImageData = addslashes(ob_end_clean()); kluda paliek. Edited April 16, 2007 by cucumber Link to comment Share on other sites More sharing options...
Delfins Posted April 16, 2007 Report Share Posted April 16, 2007 ko tu vispār mēģini izdarīt ? Link to comment Share on other sites More sharing options...
cucumber Posted April 16, 2007 Author Report Share Posted April 16, 2007 Ir bilde uz servera, kuru padotu funkcijai, kas apstrada to (dabu augstumu, platumu), tad to bildi meginu samazinat un ierakstit ieksh db, nesaglabajot uz cieta diska. $im_data = getimagesize($infile); $im=imagecreatefromjpeg($infile); $resize=imagecreatetruecolor($w,$h); imagecopyresampled($resize,$im,0,0,0,0,$w,$h,imagesx($im),imagesy($im)); ob_start(); // start a new output buffer imagejpeg($resize,"",$quality); $ImageData = addslashes(ob_get_contents()); ob_end_clean(); //query izbilde, tikai tas nenotiek, jo pazud dati no ta echo "aaaa"; //ari vairs neizpildisies imagedestroy($im); imagedestroy($resize); Link to comment Share on other sites More sharing options...
Delfins Posted April 16, 2007 Report Share Posted April 16, 2007 (edited) ob_start(); image_jpeg(); $data = ob_get_contents(); $data = do_smth($data); ob_end_clean(); PS: vismaz man viss strādā Edited April 16, 2007 by Delfins Link to comment Share on other sites More sharing options...
marrtins Posted April 16, 2007 Report Share Posted April 16, 2007 <? ob_start(); ... image blalgldkflrltg453oijy5 ... $data = ob_get_clean(); db_insert($data); ?> Link to comment Share on other sites More sharing options...
cucumber Posted April 17, 2007 Author Report Share Posted April 17, 2007 Risinajums, bija taka piektaja posta. Izradas ka f-ja bija dubleta un viena vieta jau biju izlabojis otru aizmisu izlabot. Labak f-jas nedublet, kada library ierakstit. Link to comment Share on other sites More sharing options...
Recommended Posts