Php 如何在yii中修改captcha图像源?

Php 如何在yii中修改captcha图像源?,php,yii,captcha,Php,Yii,Captcha,我的验证码图像未显示,这是它的url: mysite.com/index.php/site/captcha?v=53b56139cb358,当我试图打开它时,我得到一个 错误: 无法修改标题信息-标题已由发送(输出从/home/patrahr/public\u html/index.php:1开始) 功能动作: public function actions() { return array( // captcha action renders t

我的验证码图像未显示,这是它的url:

mysite.com/index.php/site/captcha?v=53b56139cb358
,当我试图打开它时,我得到一个

错误:

无法修改标题信息-标题已由发送(输出从/home/patrahr/public\u html/index.php:1开始)

功能动作:

public function actions()
    {
        return array(
            // captcha action renders the CAPTCHA image displayed on the contact page
            'captcha'=>array(
                'class'=>'CCaptchaAction',
                'backColor'=>0xFFFFFF,
            ),
            // page action renders "static" pages stored under 'protected/views/site/pages'
            // They can be accessed via: index.php?r=site/page&view=FileName
            'page'=>array(
                'class'=>'CViewAction',
            ),
        );
    }

那么我该如何修复这个错误呢?

当这个问题很快出现时,您必须在没有BOM的情况下转换段落UTF-8


使用记事本++执行此过程。

其余错误是什么?您还可以在SiteController中发布
public function actions()
方法吗?您的索引页或配置文件中是否有
echo
?@deacs否,没有任何echo PHP开始标记前的空行如何?