万急用thinkphp在html模板里面图片路径如何调用

WBOY
Release: 2016-06-13 13:45:23
Original
1375 people have browsed it

万急用thinkphp在html模板里面图片路径怎么调用
myweb项目名称放在WEB目录下

thinkphp放在myweb下
入口文件:/index.php
模板放在:/Tpl/default/index/,如index.html
图片目录在:/Tpl/default/public/iamges/目录下,如logo.png
在index.html中用到logo.png图片,我给图片设置绝对路径: 万急用thinkphp在html模板里面图片路径如何调用 .
问题出现了:
我用:http://localhost/myweb/Tpl/default/index/index.html 图片可以正常显示,
但是要在入口文件运行http://localhost/myweb/index.php/index/index/,图片就是不显示,
当然,这两种访问方式,页面内容是可以正常显示的,就是图片显示问题,还有CSS也调用不到了


------解决方案--------------------
在页面 万急用thinkphp在html模板里面图片路径如何调用 这样用

要么你就设置虚拟主机

http://www.myweb.com => http://localhost/myweb

然后在页面这样用 万急用thinkphp在html模板里面图片路径如何调用

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!