__构造中的未定义变量

时间:2014-04-24 09:00:01

标签: php variables undefined construct

当我尝试在__construct中定义一个变量时,它仍然给我一个未定义varbile的错误。你能帮忙吗?

    <?php



    class view {

public $model;


function    __construct($url,$root,$model,$common_model,$common_view,$alt_root,$it_selected,$hr_selected,$finance_selected) {

    $this->it_selected = $it_selected;
    $this->hr_selected = $hr_selected;
    $this->finance_selected = $finance_selected;
    $this->url = $url;
    $this->model = $model;
    $this->common_model = $common_model;
    $this->common_view = $common_view;
    $this->root = $root;
    $this->alt_root = $alt_root;


    $this->loader();


}

我仍然接受它_选择,hr_selected&amp; finance_selected未定义。

0 个答案:

没有答案