CakePHP Setflash () and Flash () methods do not work, Setflash () specific usage and simple case
Recently developed with cakephp framework, found that the Setflash () method does not work, the method is mainly used to prompt information and page jump, help!
If you can provide a setflash () use case best
Here is my code:
1.players_controlly.php
PHP Code
/ * Delete Video info * @param $id * /Public Function Del_player ($id =0) { if ($id ==0 | | empty ($id)) { $this->flash ("parameter error, please confirm operation.", "Javascript:history.go ( -1);"); else{ $movie _info= $this->players->check_player_id ($id); if ($movie _info) { $this->list_player (); $this->render (null, NULL, ' List_player '); } else{ $this->flash ("parameter error, please confirm operation.", "Javascript:history.go (-1);"); /or $this->session->setflash (' parameter error, please confirm operation. ', ' Default ', Array (' class ' = ' Type_class ') } } }
------Solution--------------------
http://blog.csdn.net/donnki/article/details/1771770
Http://book.cakephp.org/1.3/cn/view/1313/setFlash