Home >Backend Development >PHP Tutorial >请问smarty有关问题

请问smarty有关问题

WBOY
WBOYOriginal
2016-06-13 12:20:35987browse

请教smarty问题
index.class.php:
class IndexAction{

public function index(){
$smarty=new S();
$smarty->smarty->display("login.tpl.html");
}
}
?>

login.tpl.html:
请问smarty有关问题

其他元素都正常 就是这个图片打叉 折腾一晚上了 就是出不来 求解!
------解决思路----------------------
显然是路径不对
模板中的图片、css文件、js文件的相对路径是以所执行的 php 文件所在目录为基准的

------解决思路----------------------
当前目录下是./themes/images/1.jpg 或者 themes/images/1.jpg,上级目录是 ../themes/images/1.jpg

你看你的是哪种?

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