Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 图像不';不能在服务器播放框架上工作_Html_Playframework_Routes - Fatal编程技术网

Html 图像不';不能在服务器播放框架上工作

Html 图像不';不能在服务器播放框架上工作,html,playframework,routes,Html,Playframework,Routes,我对游戏中的图像有问题 这是我访问图像的方式 src="@routes.Assets.at("/images/logo-mobile-control-white.png/")" 当我从本地访问时(localhost:9000),但当我从另一台计算机访问时(http://10.253.3.243:9000)图像不起作用 这是来自本地的代码 img src=“/assets//images/logo mobile control white.png/”width=“180”height=“60”b

我对游戏中的图像有问题

这是我访问图像的方式

src="@routes.Assets.at("/images/logo-mobile-control-white.png/")"
当我从本地访问时(
localhost:9000
),但当我从另一台计算机访问时(
http://10.253.3.243:9000
)图像不起作用

这是来自本地的代码

img src=“/assets//images/logo mobile control white.png/”width=“180”height=“60”border=“0”title=“mobile 控件“alt=”Logo Mobile 控制”

这是来自服务器的代码

img src=“/assets//images/logo mobile control white.png/”width=“180”height=“60”border=“0”title=“mobile control”alt=“logo mobile control”

照样

请帮帮我

简单地使用这个

src="@routes.Assets.at("images/logo-mobile-control-white.png")"

这将产生以下结果:

<image src="/assets/images/logo-mobile-control-white.png"/>


使用浏览器检查器-并比较两种情况下的html代码。。。我们猜不出哪里出了问题。您在html中使用了
base
标记吗?从路径中删除前导和尾随斜杠?如果资源的路由默认定义为
GET/assets/*file controllers.assets.at(path=“/public”,file),则正确
但我将我的路由定义为
GET/images/*file controllers.Assets.at(path=“/public/images”,file)
因此在这种情况下,您需要以
src=“@routes.Assets.at”(“/public/images”,logo mobile control white.png”)”的形式访问它。