CAKEPHP 1.3.11
下記の実行部分でエラーになってしまい対応できないでいた。
下記の実行部分でエラーになってしまい対応できないでいた。
$session->flash();
$session->flash('auth');
↓
app_controller.phpで下記を設定することで解決した。
var $helpers = array('Session');
上記の解決に至ったのは、下記のサイトのおかげです。http://stackoverflow.com/questions/8165192/cakephp-2-0-3-fatal-error-flash-on-object
内容は下記のとおりです。
Make sure you've added the Session helper to your public $helpers array.
class SomethingsController extends AppController {
public $helpers = array('Session');
}
Or you could add it to a global AppController so that the Session helper is available to all controllers.
class AppController extends Controller {
public $helpers = array('Session');
}
きっと、こんな簡単な内容はあまりネットに掲載しないのかなぁ...
cakephp 初心者の私には、大変助かりました。
0 件のコメント:
コメントを投稿