在THINKPHP公共类里面怎么设置session?
这么写为什么不对??<?phpnamespaceHome\Controller;useThink\Controller;classCommonControllerexte...
这么写为什么不对??
<?php
namespace Home\Controller;
use Think\Controller;
class CommonController extends Controller{
public $session('URL');
public function _initialize(){
echo $this->session['URL']=CONTROLLER_NAME.'/'.ACTION_NAME;
}
}
?> 展开
<?php
namespace Home\Controller;
use Think\Controller;
class CommonController extends Controller{
public $session('URL');
public function _initialize(){
echo $this->session['URL']=CONTROLLER_NAME.'/'.ACTION_NAME;
}
}
?> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询