display('XXX'); 但是这样会导致X"/> display('XXX'); 但是这样会导致X">
Home > Backend Development > PHP Tutorial > thinkphp框架一些小疑义

thinkphp框架一些小疑义

WBOY
Release: 2016-06-13 12:42:39
Original
852 people have browsed it

thinkphp框架一些小疑问
我在用thinkphp的时候,比如验证完用户的用户名后,我想弹出一个窗口提示登录失败,然后重新display这个模版

那么我会这么写

<br />
echo "<script>alert('新产品入库成功')</script>";<br />
$this->display('XXX');<br />
Copy after login

但是这样会导致XXX的css样式加载失败,我的朋友说是因为display前面不能有输出。
请问大家碰到这样的情况怎么解决呢?
我所知道的能使用$this->success('ok'),但是除了内置的success,还有什么方法能放防止display的时候不会使样式表失效呢?或者有什么替代的方法呢?

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template