Home > Backend Development > PHP Tutorial > thinkphp session 取不到验证码,该如何解决

thinkphp session 取不到验证码,该如何解决

WBOY
Release: 2016-06-13 11:23:21
Original
1140 people have browsed it

thinkphp session 取不到验证码
          //查询验证码
function checklogin(){
              $data=$_SESSION['verifyCode'];
  echo $data;
 }
 //生成验证码
public function verify(){
    
         import("@.ORG.Image");
 $image=new Image();
         $image->buildImageVerify(6, 5);
 
   }
验证码生成了,但是控制器里面session就是取不到验证码
  static function showAdvVerify($type='png', $width=180, $height=40, $verifyName='verifyCode') {
        $rand = range('a', 'z');
        shuffle($rand);
        $verifyCode = array_slice($rand, 0, 10);
        $letter = implode(" ", $verifyCode);
        $_SESSION[$verifyName] = $verifyCode;
略。。。。。。。

thinkphp session 验证码
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