背景:我从来没用用过PHP更不用说CakePhp,这个需求也是临时接手的,希望在网页上增加一个验证码问题: 需要增加验证码,但是不知道怎样添加到网页上首先是网上下载了一个可以在CakePhp里面使用的验证码插件,然后在目录 app/Controller/Component目录新增了一个
CaptchaComponent.php文件,然后在上一级目录UsersController中的$componets中添加了Captcha,也写了一个functionfunction captcha() {
          Configure::write( 'debug' , '0' );
          $this ->autoRender = false;
          $this ->Captcha->render();
      }在网站目录  root/app/view/目录下,找到了该网页的ctp文件,在里面添加了一个验证码的文本框,<div class="row">
<?php echo $this->Form->input('Captcha', array('div'=>false,'label'=>__('Captcha') . ' *','class'=>'check', 'data-required' => true)); ?>
<div class="error-message required"><?php echo __('Please fill in your Captcha.');?></div>
</div>然后这个文本框是可以在网页上显示了,但是在添加验证码图片的时候出现问题
echo $html ->image( array ( 'controller' => 'Users' , 'action' => 'captcha' ));这样添加一个现实的时候直接提示错误,Error: Fatal Error (1): Call to a member function image() on a non-object in然后尝试view.ctp里面直接使用 <img src='1.img' > 也无法显示图片
请问这个问题应该怎样处理,毕竟是从来没有接触过php方面,请大佬们指点添加验证码 参考的帖子是  http://blog.csdn.net/goingdownba/article/details/4343399