欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php 從數(shù)據(jù)庫(kù)提取二進(jìn)制圖片的處理代碼

 更新時(shí)間:2009年09月09日 21:57:49   作者:  
形式上類(lèi)似UCH 只是存儲(chǔ)方式不一樣 本人比較愚鈍 這個(gè)問(wèn)題困惑了我半天 希望對(duì)有同樣問(wèn)題的phper有所幫助 高手們別見(jiàn)笑!
image.php文件
復(fù)制代碼 代碼如下:

<?php
$conn=@mysql_connect("localhost","root","123") or die("服務(wù)器連接錯(cuò)誤!"); //鏈接數(shù)據(jù)庫(kù)
@mysql_select_db("upload",$conn) or die("未發(fā)現(xiàn)數(shù)據(jù)庫(kù)!");
$query="select * from upfile where ftag=$fn";
$result=mysql_query($query);
if(!$result) die("error: mysql query");
$num=mysql_num_rows($result);
if($num<1) die("error: no this recorder");
$data = mysql_result($result,0,"picture");
header("Content-type: image/JPEG",true);
echo $data;
?>

上面是圖片提取
前臺(tái)顯示文件
復(fù)制代碼 代碼如下:

<img src="image.php?fn=<?php echo $fn;?>">

相關(guān)文章

最新評(píng)論