LinuX Posted March 16, 2010 Report Share Posted March 16, 2010 Sveiki, pirmo reizi saskaros ar bildes ievietosanu datubāzē un atspoguļošanu brauseri, ievietot man it ka izdevās, phpmyadmin tipam uzliku BLOB un itkā ievietojās, bet kad izsaucu bildi ara paradas tikai bildes nosaukums. mekleju google.lv, lai nebutu jūs jāaizkavē, jo tas laikam viegli, diemžēl google.lv neko neatradu. ja varat kkā palīdziet. kā dabūt āra bildi? Paldies. Quote Link to comment Share on other sites More sharing options...
bobsters Posted March 16, 2010 Report Share Posted March 16, 2010 uztaisi failu ar nosaukumu image.php un tur uzraksti kodu kurs izvelk bildi no datbubazes un izvada tad tur kur vajag to bildi pievieno ar <img src=image.php> palidzibu ceru ka saprati domu! Quote Link to comment Share on other sites More sharing options...
LinuX Posted March 16, 2010 Author Report Share Posted March 16, 2010 bet tas pats kods, kas izvelk bildi no datubāzes ir tāds pats kā izvelkot piemēram tekstu? Quote Link to comment Share on other sites More sharing options...
bobsters Posted March 16, 2010 Report Share Posted March 16, 2010 nu bet samekle google.lv ka izvelk attelu beigas varu pateikt ka jaievieto header("content-type:image/x"); x ir atkarigs no attela formata jpg gif png kadu saglabaji datubaze Quote Link to comment Share on other sites More sharing options...
LinuX Posted March 17, 2010 Author Report Share Posted March 17, 2010 (edited) Esiet cilvēki, vai kādam ir gatavs skripts un vai viņš/viņa var ar to padalīties, jau 2 dienas nevaru tikt galā ar bildes ievadīšanu un izvadīšanu no phpmyadmin! Edited March 17, 2010 by LinuX Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted March 17, 2010 Report Share Posted March 17, 2010 (edited) Nu no ta ko tu te radi tev nekas nestradas...sakot jau ar DB konekciju. Uzzini atshkjiribu starp ' un ". Un ja gribi radit vairakas bildes, tad izmanto <img /> nevis kaut kadus mistrojumus... Edited March 17, 2010 by rATRIJS Quote Link to comment Share on other sites More sharing options...
bobsters Posted March 17, 2010 Report Share Posted March 17, 2010 nosauc sito par image.php $con=mysql_connect('host','user','pass') or die (mysql_error()); mysql_select_db('dbname',$con) or die (mysql_error()); $q="SELECT * FROM table" or die (mysql_error()); $data=mysql_query($q); $showdata=mysql_fetch_assoc($data); header("content-type:image/jpg"); echo $showdata["rindas_nosaukums_kur_bilde"]; talak ievieto lapa ar <img src=image.php width=200 height=200> Quote Link to comment Share on other sites More sharing options...
LinuX Posted March 17, 2010 Author Report Share Posted March 17, 2010 Liels paldies! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.