0

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

    <?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();


}

我仍然收到 it_selected、hr_selected 和 finance_selected 未定义。

4

0 回答 0