<?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.adminuser},代码可以显示我当前登录的账号,但是我用下面{$think.session.test},就显示不了,空白的, $test = m('aconfig')->where(array('zcinfo' ))->find(); //我的html用{$think.session.test}代码这个显示不了,test变量的值,那里出错了吗,(aconfig 这个是数据库表名) session('test',$test['zcinfo']); //我的html用{$think.session.test}代码这个显示不了,test变量的值,那里出错了吗, (aconfig 这个是数据库表的字段名,我就是想在html显示这个字段里面值),求救 session('adminuser', $user['mb_username']); $_session['logintime'] = time(); die("<script>document.location.href='/admin.php/home/index/main';</script>"); } } }
我在html是用{$Think.session.test}代码显示
另外 我在html用 为什么不行呢
<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)看看能有值么?
HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号