但是我弄了半天仍然没有成功,请大神告诉我应该怎么做,求求大神了!!
求求求了,我是真的搞不懂啊,我总是出错,下面的是我写的Yq.class.php代码
<?php
namespace Think;
use Think\Controller;
class Yq extends Controller {
$sessn=session('name');
if (!empty($sessn)) {
$zhongxin='<li class="zhongxin"><a href="http://www.9ido.cn/index.php/Index/zhongxin">个人中心</a> </li>';
$quit='<li><a href="http://www.9ido.cn/index.php/Index/quit">退出</a> </li>';
$this->assign('quit',$quit);
$this->assign('zhongxin',$zhongxin);
}else{
$zhuce='<li class="zhuce"><a href="http://www.9ido.cn/index.php/Index/zhuce">注册 </a> </li>';
$login='<li class="login"><a href="http://www.9ido.cn/index.php/Index/login">登陆 </a> </li>';
$this->assign('zhuce',$zhuce);
$this->assign('login',$login);
}
}
?>我是真的不知道这个文件要怎么弄啊!! 最佳答案