图片显示,该如何处理

WBOY
Release: 2016-06-13 13:31:35
Original
890 people have browsed it

图片显示
php读取出数据库的路径G:/network/upload_files/2008/1331734471966.jpg,然后放到 图片显示,该如何处理 中为什么无法显示图片?是不能使用全路径吗?

------解决方案--------------------
/network/upload_files/2008/1331734471966.jpg 这样呢
------解决方案--------------------


少年,G:/network/upload_files/2008/1331734471966.jpg存在文件吗

用相对路径吧,这样不好的。
------解决方案--------------------
先弄清楚网站的目录是在什么地方 然后从那个地方开始 使用/

例如 web 目录是 network

那么正确的地址就是
./upload_files/2008/1331734471966.jpg


------解决方案--------------------
将你要显示的图片拖到显示页面,就会看看此时图片显示的路径,自己在整合下当前网站的根目录。
------解决方案--------------------
G://network//upload_files//2008//1331734471966.jpg
或者
G:\network\upload_files\2008\1331734471966.jpg
同样建议使用相对路径:
http://localhost/upload_files/2008/1331734471966.jpg
"http://localhost/" /path/Apache/htdocs/
------解决方案--------------------

探讨
php读取出数据库的路径G:/network/upload_files/2008/1331734471966.jpg,然后放到 图片显示,该如何处理 中为什么无法显示图片?是不能使用全路径吗?
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!