CakePHP Setflash () and Flash () methods do not work, Setflash () specific usage and simple cases, how to deal with

Source: Internet
Author: User
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
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.