Dynamic images via PHP and BLOB in Mysql -
i have written php script grabs icon mysql dynamically depending on page on.
it works in safari, shows alt tag in firefox , explorer.
any on welcome little stuck!
code pull in image:
echo '<img src="website/_scripts/showicon.php?appid='.$_get['appid'].'" alt="icon" />';
showicon.php page:
<?php require(dirname(realpath(__file__)). '/db.inc.php'); mysql_select_db($connection, $table); $appicon = mysql_query("select image_app cc_apps id_app = '1' limit 1", $table) or die(mysql_error()); $ri = mysql_fetch_assoc($appicon); $imagebytes = $ri['image_app']; header("content-type: image/jpeg"); print $imagebytes; ?>
i have used script before, (well similar) , works fine on browsers...
so needed re-upload images database, , change type image/png, , bobs uncle!
thanks comments.
Comments
Post a Comment