数据库用的是mysql数据库
想上传图片到数据库里 然后再读取出来并显示在页面上
谁帮个忙 看这个代码怎么写
比如: 数据库表picture 有字段id int,image blob
<html>
<body>
<img style="MARGIN: 10px; FLOAT: left" src="<?php include_once('showpicture.php')?>"> </td>
<td align=right><input name="picfile" type="file" size=40></td>
<td align=left><input name="icon_submit" value="上传照片" type="submit">
</body>
</html>
请各位帮帮忙
想上传图片到数据库里 然后再读取出来并显示在页面上
谁帮个忙 看这个代码怎么写
比如: 数据库表picture 有字段id int,image blob
<html>
<body>
<img style="MARGIN: 10px; FLOAT: left" src="<?php include_once('showpicture.php')?>"> </td>
<td align=right><input name="picfile" type="file" size=40></td>
<td align=left><input name="icon_submit" value="上传照片" type="submit">
</body>
</html>
请各位帮帮忙
$file="1.png";
$bin=file_get_contents($file);
$bin=base64_encode($bin);//新增编码
$response=base64_decode($bin);//查询解码