如何去除验证码

  

去除前台用户登录验证码
1.修改lib/default/user_act.php 注释掉或删除55-58行
修改为
 

  1. //if(!session::get('verify') || front::post('verify')<>session::get('verify')) {
     
  2. //front::flash('验证码错误!');
     
  3. //return;
     
  4. //}
复制代码


2.修改template/default/user/login.html 注释掉或删除或删除26-30行 89-96行

 

  1. if(document.loginform.verify.value.length==0){
     
  2. alert("请输入验证码!");
     
  3. document.loginform.verify.focus();
     
  4. return false;
     
  5. }
复制代码


 

  1. <tr>
     
  2. <td style="height: 30px" align="right">
     
  3. 验证码:
     
  4. </td>
     
  5. <td style="height: 30px">
     
  6. <input type='text' id="verify" tabindex="3" name="verify" class="input" style="width:100px;" /> {verify()}
     
  7. </td>
     
  8. </tr>
复制代码


3.修改template/default/user/login_js.html 注释掉或删除21行
 

  1. <div style="float:right;width:50px;"><input type='text' id="verify" class="login_input" style="width:50px;" name="verify" tabindex="3" /></div><div style="float:left;width:112px;"><span style="float:left;">验证码: </span><span style="float:left;">{verify()}</span></div>
复制代码



去除后台用户登录验证码
1.修改lib/admin/admin_act.php 注释掉或删除25-29行
 

  1. // if(!session::get('verify') || front::post('verify')<>session::get('verify')) {
     
  2. // front::flash('验证码错误!');
     
  3. // $this->render();
     
  4. // exit;
     
  5. // }
复制代码


2.修改template/admin/admin/login.php 注释掉或删除68-74行
 

  1. <tr>
     
  2. <td style="height: 30px" align="right">
     
  3. 验证码:
     
  4. </td>
     
  5. <td style="height: 30px">
     
  6. <input type='text' id="verify" tabindex="3" name="verify" class="input" style="width:100px;" /> {verify()}
     
  7. </td>
     
  8. </tr>
复制代码


操作完成后,请清空 cache文件夹内文件,然后刷新页面,查看结果