【发布时间】:2023-11-26 07:26:02
【问题描述】:
我的验证码图片没有显示,这是它的网址:
mysite.com/index.php/site/captcha?v=53b56139cb358,当我试图打开它时,我得到一个
错误:
Cannot modify header information - headers already sent by (output started at /home/patrahr/public_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',
),
);
}
那么我该如何解决这个错误呢?
【问题讨论】:
-
其余的错误是什么?你也可以在你的 SiteController 中发布
public function actions()方法吗? -
您的索引页或配置文件中是否有
echo? -
@deacs 没有,没有任何回声
-
PHP开始标签前空一行怎么样?