cakephp:我在共享主机上的域justhost没有显示flash消息

时间:2012-01-24 06:39:17

标签: cakephp message shared host

我在共享主机上的域未显示任何Flash消息。它在我的本地服务器上显示正常。我在students_controller中有以下内容:

function add(){

$this->Session->setFlash('Your child\'s admission has been received. We will send you an email shortly.'); 
}

我在default.ctp(布局文件)和add.ctp:

中有以下内容
echo $this->Session->flash();

/ app / tmp文件夹及其中的所有文件夹都具有权限777。

我也放了调试($ this-> Session-> read());在students_controller中它正在给出:

Array
(
    [_Token] => a:5:{s:3:"key";s:40:"39a5e70df521f8f175d20060abb261b69611f0a1";s:7:"expires";i:1327392309;s:18:"allowedControllers";a:0:{}s:14:"allowedActions";a:0:{}s:14:"disabledFields";a:0:{}}
    [Message] => Array
        (

        [flash] => Array
            (
                [message] => Your child's admission has been received. We will send you an email shortly.
                [element] => default
                [params] => Array
                    (
                    )

            )

    )

在app_controller.php中:

var $helpers = array('Html','Form','Ajax','Javascript','Session');
var $components=array('Auth','Session','Cookie');

在core.php中,我尝试过设置:  配置:: write(' debug',0);而不是Configure :: write(' debug',2);  配置::写(' Session.save',' cake');而不是配置::写(' Session.save',' php');

我在routes.php之前或之后没有空格。

有人可以帮帮我吗?我犯了什么错误?

2 个答案:

答案 0 :(得分:0)

如果我尝试代码abe,我会收到一个错误,即变量$session未定义。 check()来电不应该是:

$this->Session->check()

我不确定您是否需要check(),但$this->Session->flash()除非填充了所需的会话密钥,否则不会打印任何内容。

答案 1 :(得分:0)

我不肯定这会有所帮助,但这里有他们知识库的链接:https://my.fastdomain.com/cgi/help/107

相关问题