Home >Backend Development >PHP Tutorial >图片url上传进数据库后如何取出来显示在页面上?

图片url上传进数据库后如何取出来显示在页面上?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 14:02:441239browse

我用了上传进数据库后(例如:图片url为C:\php\www\pictures\7883446_144433699129_2.jpg)取出来的也是这个url,这样在前台无法正常显示
正常显示的url应该是(192.168.1.5:1500/pictures/01300000828258126806509311482.jpg)不知道咋办了,是存的有问题吗?应该如何操作呢?谢谢。


回复讨论(解决方案)

存 \pictures\7883446_144433699129_2.jpg 这一段就够了嘛

显示时,host+path 就行了

存 \pictures\7883446_144433699129_2.jpg 这一段就够了嘛

显示时,host+path 就行了
咋能只存后面那段啊,用file选取时已经带上前面的C:/PHP/WWW了。

这就需要你用php处理了嘛

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