I want to fetch blob datatype of images from MySQL database using PHP and these images displayed in iPhone UIImageView. Can anybody post some PHP code to retrieve images from MySQL?
1条回答 默认 最新
- drbouzlxb92333332 2010-08-11 07:42关注
Here's an exemplary tutorial: http://forum.codecall.net/php-tutorials/7663-tutorial-storing-images-mysql-php-part-ii-display-your-images.html.
The key is
... header('Content-type: image/jpg'); echo $content; ...
Note, that the linked tutorial also shows you a good example of an sql injection vulnerability. Before assembling the query try at least something like
mysql_real_escape_string()
.本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 ubuntu子系统密码忘记
- ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
- ¥15 保护模式-系统加载-段寄存器
- ¥15 电脑桌面设定一个区域禁止鼠标操作
- ¥15 求NPF226060磁芯的详细资料
- ¥15 使用R语言marginaleffects包进行边际效应图绘制
- ¥20 usb设备兼容性问题
- ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
- ¥15 安装svn网络有问题怎么办
- ¥15 vue2登录调用后端接口如何实现