帮助显示图像? [英] Help Display an image?

查看:63
本文介绍了帮助显示图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Java Web Development,
我想在文件计算机中显示一个图像(对于ubuntu是file:///home/icotp/Desktop/img.gif),但是正在运行的系统是(http://localhost:8080/file).
我可以将http://localhost:8080设置为file:///...

Im using Java Web Development,
I want to display an image in my file computer(file:///home/icotp/Desktop/img.gif for ubuntu) but the running system is (http://localhost:8080/file).
Can I make http://localhost:8080 to file:///...

推荐答案

您不能访问根目录之外的文件.将映像文件移到服务器的根目录并从那里指向它.
You cannot access files outside of your root directory. Move the image file to the root directory of your server and point to it from there.


如果无法更改我的根目录...
如何显示不在服务器(文件系统)中的图像.
If its impossible to change my root derictory...
How can I display an image that is isn''t in the Server (in the file system).


将图像文件移动到服务器目录(如果使用的是Linux)它应该类似于var/www)或指向网址(htt://something.com/image.jpg)
Either move the image file to your server directory (if you''re using linux it should be something like var/www) or point to a web url (htt://something.com/image.jpg)


这篇关于帮助显示图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆