Home > Backend Development > PHP Tutorial > 在symfony2里如何使用setFlash??

在symfony2里如何使用setFlash??

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:32:25
Original
1132 people have browsed it

在symfony2里如何使用setFlash??我使用时,一直有错误。而且不大会用setFlash。。

回复内容:

在symfony2里如何使用setFlash??我使用时,一直有错误。而且不大会用setFlash。。

Symfony2 的控制器里直接 addFlash 就行了:

<code>$this->addFlash('notice', 'Notice Message');
</code>
Copy after login

详细请看 107 行:

https://github.com/symfony/symfony/blob/2.8/src/Symfony/Bundle/Framewo...

你是如何做的,遇到了什么错误,尝试过的解决办法,都细细道来!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template