|
我在使用CI框架的插件captcha.php,测试验证码的时候,按照源码中给出的列子写了以下代码:
--->test.php
function index(){
$this->load->plugin ( 'captcha' );
$vals = array ('word' => 'hello',
'img_path' => './upload/',
'img_url' => 'http://localhost/ci/upload/',
'img_width' => '150',
'img_height' => 30,
'expiration' => 7200
);
$cap = create_captcha ( $vals );
echo $cap ['image'];
}
在显示器上图片背景可以看到,也就是说图片路径是对的,但是已定义“word”对应的内容却不显示,
我搞了半天,还是搞不定,请各位帮帮忙。。。
这是文件路径:
---ci(根目录)
-----upload(存放图片)
------system
----------application
-------------controllers
-------------test.php |
|