Home>Article>php教程> 如何实现上传图片和显示图片功能

如何实现上传图片和显示图片功能

WBOY
WBOY Original
2016-06-13 09:53:29 1478browse




如何实现上传图片和显示图片功能

如何实现上传图片和显示图片功能(最好有代码),谢谢

我来回答




网站建意与解决方法
晕。。。上传 然后把路径存数据库 或者直接掉图片路径。。上传的代码 太多了 move_uploaded_file

网站建意与解决方法
我都知用这个函数move_uploaded_file,也上传图片到某个文件夹,但是不知道怎么才能显示图片和加入数据库

网站建意与解决方法
你存入数据库里照片的名称,然后显示的时候先定位你传到的路径,后面加上从数据库中取出来的照片名称!

网站建意与解决方法
你用move_uploaded_file不是有个文件名吗,那个就是图片的地址啊,直接输出不就ok了么

网站建意与解决方法
uchome就有这样的代码,相册


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn