<?php
$conn=@mysql_connect("localhost","root","123") or die("服务器连接错误!"); //链接数据库
@mysql_select_db("upload",$conn) or die("未发现数据库!");
$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;
?>
php 从数据库提取二进制图片的处理代码
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:http://www.heiqu.com/a941c2bb7f73c2f4a69341095866c6d8.html