CakePHP会话ID路径或其他方法来共享一个url的结果 - 建议欢迎 [英] CakePHP session ID path or other method to share the results of a url - recommendations welcome

查看:104
本文介绍了CakePHP会话ID路径或其他方法来共享一个url的结果 - 建议欢迎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个明智的蛋糕方法建议一个基于会话ID的网址,我可以与他人分享,看到我在我看到的结果相同的搜索结果。

I am looking for suggestions on a sensible Cake approach to creating a session id based url that I can share with others to see the same search results I am seeing on my end.

我知道在标准php,我只是得到会话ID,并将其传递到url。但我的猜测蛋糕可能有一个方法或方法这个确切的事情(我的猜测)。我还没有找到任何具体的东西。

I know in standard php, I would just get the session id and pass it to the url. But my guess Cake probably has a method or approach for this exact thing (my guess). I have not been able to locate anything specific yet.

有关使用Cake方法的最佳方法的任何想法?

Any ideas as to the best approach to this with Cake methods? Or will I need to re-invent the wheel on this?

推荐答案

我解决了这个问题:

search ( ... ) {
    if ($this->RequestHandler->isPost()) {
        $this->Session->write('search_form_sess', $this->data);
        $initial_url = $ApplicantAge . '/' . $SpouseAge . '/' . $NumberChildren . '/' . $Vision . '/' . $Zip;
        $this->redirect(array('action' => 'search', $initial_url));
        exit();
    }
...

}

这篇关于CakePHP会话ID路径或其他方法来共享一个url的结果 - 建议欢迎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆