0

以下のコントローラー関数で指定されているように、img_path と img_url を見つけようとしています。それはキャプチャコードを生成しています。以下のコントローラー関数で指定されている img_path と img_url が何であるかを知っている人はいますか?

コントローラ

 function generateCaptcha() {

            //Load Captcha helper
            $this->load->helper('captcha');

                $vals = array(
                    'word'       => 'Security Key words',
                    'img_path'   => './uploads/captcha/',
                    'img_url'    => base_url() . 'captcha/',
                    'img_width'  => 200,
                    'img_height' => 50,
                    'expiration' => 7200,
                );

                /* Generate the captcha */
                $captcha = create_captcha($vals);

                /* Store the captcha value (or 'word') in a session to retrieve later */
                $this->session->set_userdata('captchaWord', $captcha['word']);
                $this->session->set_userdata('captchaImage', $captcha['image']);

                return $captcha['image'];
            }
4

1 に答える 1

2

ここ

img_pathは captach フォルダーへの絶対パスです

img_urlはキャプチャ イメージの相対パスです。

$vals = array(
    'word'       => 'Security Key words',
    'img_path'   => './uploads/captcha/',
    'img_url'    => base_url() . 'uploads/captcha/',
    'img_width'  => 200,
    'img_height' => 50,
    'expiration' => 7200,
);
于 2015-10-20T08:23:08.947 に答える