PHPのZend Frameworkを使っていますが。
画面の遷移するときの値の保存はどうすればいいのですか?
php
1<?php 2require_once 'Zend/Controller/Action.php'; // コンポーネント呼び出し 3require_once 'Zend/Session/Namespace.php'; // セッションデータの読>み込みと保存 4 5class MorisawaController extends Zend_Controller_Action 6{ 7 8 // フィールドの定義 9 var $nSess; // セッション 10 11 12 public function loginAction() // アクションメソッド 13 { 14 15 } 16 17 public function indexAction() 18 { 19 // セッションのインスタンスを生成 20 $this->nSess = new Zend_Session_Namespace('GoodsMaintenance'); 21 } 22 23 public function registAction() 24 { 25 } 26 27 public function regist2Action() 28 { 29 $this->nSess->cId="AAA"; 30 31 } 32 33 public function registmainAction(){ 34 $this->view->pass22=$this->nSess->cId; 35
でregist2->registmainに遷移するのですが
registmainでpass22を表示すると何も出ません。
なぜですか?
そして画面遷移で値が保存されるにはどうすべきですか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。