php高手来帮忙解答下,define('ROUTE_M', $this->param->route_m());
classapplication{private$param;publicfunction__construct(){global$_cfg;$this->param=&...
class application {
private $param;
public function __construct() {
global $_cfg;
$this->param =&System::load_sys_class('param');//获取路径 ,疑问1:是否执行了&System::load_sys_class('param')该语句然后将路径赋值给param?
define('ROUTE_M', $this->param->route_m()); //疑问2:怎么使用了两个->怎么理解?
define('ROUTE_C', $this->param->route_c());
define('ROUTE_A', $this->param->route_a());
$_cfg['route_m'] = ROUTE_M;
$_cfg['route_c'] = ROUTE_C;
$_cfg['route_a'] = ROUTE_A;
$this->global_start();
$this->global_init();
$this->global_end();
}
public function route_m() {
if(empty($this->route_url[1])){
$this->route_url[1]=$this->route_config['default']['m'];
}
define('G_MODULE_PATH',WEB_PATH.'/'.$this->route_url[1]);
return $this->route_url[1];
}
} 展开
private $param;
public function __construct() {
global $_cfg;
$this->param =&System::load_sys_class('param');//获取路径 ,疑问1:是否执行了&System::load_sys_class('param')该语句然后将路径赋值给param?
define('ROUTE_M', $this->param->route_m()); //疑问2:怎么使用了两个->怎么理解?
define('ROUTE_C', $this->param->route_c());
define('ROUTE_A', $this->param->route_a());
$_cfg['route_m'] = ROUTE_M;
$_cfg['route_c'] = ROUTE_C;
$_cfg['route_a'] = ROUTE_A;
$this->global_start();
$this->global_init();
$this->global_end();
}
public function route_m() {
if(empty($this->route_url[1])){
$this->route_url[1]=$this->route_config['default']['m'];
}
define('G_MODULE_PATH',WEB_PATH.'/'.$this->route_url[1]);
return $this->route_url[1];
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询