1.开启留言:
找到application/config.php 把 ‘guestbook‘设置为1即为开启
2.使用验证码
在模版页面留言表单加入
{eq name="$field2.IsVertify" value="1"}
<p class="contactform_code">
<input type="text" class="inputtxt" name="vertify" size="4" placeholder="验证码" autocomplete="off" style="width: 180px;">
<img {$field2.VertifyData} style="height: 60px;">
</p>
{/eq}
3.优化验证码错误
原因是地址没加token,找到
core/library/think/template/taglib/eyou/TagGuestbookform.php
查询ey_fleshVerify方法,在地址var src =中&type=guestbook后面加&token=token{$token_id}
原文:https://blog.51cto.com/14747960/2485329