2016-06-15 3 views
1

CodeIgniter 프로젝트에서 Tank auth를 사용하고 싶지만 CodeIgniter에서 Botdetect captcha를 기본 설치로 시작할 필요가 있습니다.Codeigniter Botdetect/Tank-Auth Captcha 404 Nginx에서 찾을 수 없음

나는 link에 대한 빠른 시작 설치 가이드를 따라 왔습니다.

나는이 조항을 실행하려고 아래 여기에 응용 프로그램/뷰/welcome_message.php, 아래에 저장이되는 뷰 :

<?php 
    defined('BASEPATH') OR exit('No direct script access allowed'); 
?><!DOCTYPE html> 
<html lang="en"> 
    <head> 
     <meta charset="utf-8"> 
     <title>Welcome to CodeIgniter</title> 
     <link type="text/css" rel="Stylesheet" href="<?php echo CaptchaUrls::LayoutStylesheetUrl() ?>" /> 
    </head> 
    <body> 

     <?php echo $captchaHtml; ?> 
     <input type="text" name="CaptchaCode" id="CaptchaCode" value="" /> 
    </body> 
</html> 

그리고 해당 컨트롤러는 응용 프로그램/컨트롤러/오신 것을 환영합니다으로 저장됩니다 .PHP, 여기 아래 :

<?php 
    defined('BASEPATH') OR exit('No direct script access allowed'); 

    class Welcome extends CI_Controller { 

    public function __construct(){ 
     parent::__construct(); 
    } 
    public function index() // Your controller 
    { 
     // load the BotDetect Captcha library and set its parameter 
     $this->load->library('botdetect/BotDetectCaptcha', array(
      'captchaConfig' => 'ExampleCaptcha' 
     )); 

     // make Captcha Html accessible to View code 
     $data['captchaHtml'] = $this->botdetectcaptcha->Html(); 
     $this->load->view('welcome_message',$data); 
    } 
} 

브라우저에서 실행할 때 내가받은 것입니다 :

Captcha Page

나는 BotDetect가 세션을 사용하고 있으며 필요한 구성을 수정하고 각 세션마다 "ci_sessions"에서 세션이 생성되고 있음을 알고 있습니다.

어떻게하면이 문제를 해결하여 BotDetect Captcha를로드 할 수 있습니까?

답변

1

"application/config/routes.php"파일에서 BotDetect 보안 문자 요청 (Captcha 이미지, 사운드, 리소스 등)에 사용되는 BotDetect 보안 문자 경로를 등록하는 것을 잊어 버린 것 같습니다.

확인하시기 바랍니다 다음 2 점 :

1 - 수 있도록 당신이 당신의 "routes.php"파일

$route['botdetect/captcha-handler'] = 'botdetect/captcha_handler/index'; 

2 BotDetect 보안 문자 경로를 등록했는지 확인 - 당신의 "컨트롤러"폴더의 요구에 "/controllers/botdetect/Captcha_handler.php"파일이 있어야합니다.

이 정보가 도움이되기를 바랍니다.

+0

감사합니다. :) –