模板不存在[./tpl/Home/pigcms/Adma_index.html]解决方案

 2014-10-01 20:08:28   评论   1,217次浏览

很多开发者使用小猪cms进行微信公众平台的开发,我们在开发的时候,在生成二维码宣传页的时候,会提示错误:模板不存在[./tpl/Home/pigcms/Adma_index.html],那么这个错误应该如何解决呢?

首先咱们打开FTP看一下这个文件是否存在,如果不存在,那么则说明确实没有文件来响应咱们的请求。

这样一切都好办了,咱们只需要建立一个Adma_index.html文件然后传到对应目录,在这个文件中我们读取相关数据表单的内容就可以自己也弥补一下这个缺失的文件。

小猪cms

具体这个文件的代码,可以是这样的:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>{pigcms:$adma.title} 二维码宣传页 by {pigcms:$adma.copyright}</title>
<meta name="keywords" content="关键词"/>
<meta name="description" content="描述"/>
<style type="text/css">
.yulan {
background: url(/tpl/User/default/common/images/adma/erweimabg.png) repeat scroll 0 0 #4E5359;
color: #666666;
font: 14px/1.5 Microsoft YaHei,Helvitica,Verdana,Tohoma,Arial,san-serif;
margin: 0;
padding: 0;
color: #666666;
}
* {
padding: 0;
margin: 0;
border: none;
}
.userinfoArea th {
width: 100px;
}
.clr{
clear:both;
}
.yulan {
background: url(/tpl/User/default/common/images/adma/erweimabg.png) repeat scroll 0 0 #4E5359;
color: #666666;
font:14px/1.5 Microsoft YaHei,Helvitica,Verdana,Tohoma,Arial,san-serif;
margin: 0;
padding: 0;
color: #666666;
}
.yulan .main{ margin:0 auto; }
.yulan h1{ font-size:26px; color:#f5f5f5; font-weight:normal; text-align: center; margin:35px 0 25px 0; text-shadow:0 1px 3px #111111;}
.yulan .erweima{height: 301px;
margin: 0 auto;
width: 301px;}
.yulan .erweima img{border: medium none;
-moz-box-shadow: 0 4px 3px 2px #333333;
-webkit-box-shadow: 0 4px 3px 2px #333333;
box-shadow: 0 4px 3px 2px #333333;
-webkit-border-radius:6px;
-moz-border-radius:6px;
border-radius:6px;
width: 100%;}
.yulan .beizhu{ margin:15px auto 5px;text-align: center;}
.yulan .beizhu p{ line-height: 48px;}
.yulan .beizhubg{color: #B4B7BC;background: url(/tpl/User/default/common/images/adma/erweima_bg2.png) repeat-x scroll 0 0 transparent;
font-size: 12px;
height: 48px;
margin: 10px auto;
width: 230px;text-shadow: 0 -1px 0 #111112;
line-height: 48px;display: inline-block;position: relative;}
.yulan .beizhuleft{background: url(/tpl/User/default/common/images/adma/erweima_bg2_left.png) no-repeat scroll 0 0 transparent;
display: block;
float: left;
height: 48px;
margin-left: -26px;
width: 26px;}
.yulan .beizhuright{ background: url(/tpl/User/default/common/images/adma/erweima_bg2_right.png) no-repeat scroll 0 0 transparent;
display: block;
float: right;
height: 48px;
margin-right: -26px;
width: 26px;}
.yulan .content{color: #B4B7BC; font-size:14px;padding:5px;width:300px; margin:0 auto;text-shadow: 0 -1px 0 #111112;
float:none; background-color:transparent;min-height:40px;border:0;
}
.yulan .footer {
background: url(/tpl/User/default/common/images/adma/erweimabg.png) repeat scroll 0 0 transparent;
color: #AAAAAA;
margin:20px auto 0;
text-shadow: 0 -1px 0 #111111;
text-align:center;
line-height: 48px;
width: 100%;
padding:0;
}
.yulan .footer p{
background: url(/tpl/User/default/common/images/adma/erweima_footer.png) no-repeat scroll center top transparent;
font-size:12px;line-height: 48px;
}
</style>

</head>
<body class="yulan" oncontextmenu="return false" onselectstart ="return false">

<div class="main">
<h1 id="adtitle">{pigcms:$adma.title}</h1>
<div class="erweima"><img id="gzhewm" src="{pigcms:$adma.url}"></div>
<div class="beizhu">
<div class="beizhubg">
<div class="beizhuleft"></div>
<div class="beizhuright"></div>
<p>请使用微信扫描二维码关注此公众号</p>
</div>
</div>
<div class="content" id="gzhinfo">
{pigcms:$adma.info}
</div>
<div class="clr"></div>
<div class="footer"><p id="gzhcopyright">{pigcms:$adma.copyright}</p></div>
</div>

</body>
</html>

上面的整体代码复制到对应的文档中,然后命名为Adma_index.html上传到对应的目录,就可以了。

蚂蚁森林为我浇水吧!

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: