Home  >  Q&A  >  body text

1-8 Create a view layer, the view path is wrong

1-8 Create the view layer and follow the teacher’s code. The view path is wrong.

core/View.php file

public function make ($file) {
$this ->file = 'view/'.$file.'.html';
return $this;
}

I only added set_include_path($_SERVER['DOCUMENT_ROOT'].' demo/web/'); can be displayed correctly. Why didn't the teacher add anything? Is it enough to just use the above code?

susususu1823 days ago930

reply all(0)I'll reply

No reply
  • Cancelreply