2017-03-14 2 views
1

をIIS、私のキャプチャはIは、Windows Server 2016の標準を使用して作成していないとキャプチャ をshoingない最後のサーバーではなく、新しいサーバーで働いていた、10 < PHP 7.0とCodeIgniterのをIIS 3.1のCodeIgniterのキャプチャがで表示されないことは、私はCodeIgniterのウェブサイトを持っていると私はキャプチャを使用

function index() 
    { 
     if ($this->session->userdata('us_login') == TRUE) 
     { 
      redirect ('dashboard'); 
     } 
     else 
     { 
      $data['captcha'] = $this->_create_captcha(); 
      $this->load->view('login', $data); 
     } 
    } 



function _create_captcha() 
{ 
     $this->load->helper('captcha'); 
     // numeric random number for captcha 
     $random_number = substr(number_format(time() * rand(),0,'',''),0,8); 
     // setting up captcha config 
     $vals = array(
      'word' => $random_number, 
      'img_path' => './captcha/', 
      'img_url' => base_url().'captcha/', 
      'img_width' => 280, 
      'img_height' => 45, 
      'expiration' => 7200 
      ); 
     $data['captcha'] = create_captcha($vals); 
     $this->session->set_userdata('captchaWord',$data['captcha']['word']); 
     return $data['captcha']; 
} 

答えて

0

thisはあなたの質問にお答えします。あなたは、ほとんどの変更は、私はこの問題を修正captcha_helper

-     if (($rand_index = unpack('C', $bytes[$byte_index++])) > $rand_max) 
+     list(, $rand_index) = unpack('C', $bytes[$byte_index++]); 
+     if ($rand_index > $rand_max) 
+0

固定system/helpers/captcha_helper.php

CodeIgniterのパスで

は、php.iniファイルで= php_gd2.dllを拡張を有効にします –

関連する問題