html用think.session.显示,怎么在控制器里面设置变量啊?TP框架我是初学者
Jun 20, 2016 pm 12:40 PM
1 | <?phpnamespace Home\Controller; use Think\Controller; class LoginController extends Controller{ public function index() { $this ->display( 'index/login' ); } public function logincl() { if (IS_POST) { $user = M( 'member' )->where( array ( 'MB_username' => admin))->find();
|
登录后复制
回复讨论(解决方案)
我在html是用{$Think.session.test}代码显示
另外 我在html用 为什么不行呢
1 | <td bordercolor= "cccccc" ><select name= "opwww" id= "opwww" > <option value= "0" ';if ($Think.session.adminoff==0){echo "selected=selected";};echo ' >开启注册系统</option> <option value= "1" ';if ($Think.session.adminoff==1){echo "selected=selected";};echo ' >关闭注册系统</option> </select>
|
登录后复制
这是什么鬼?你dump($test)看看能有值么?