i am trying to build an Model/View/Controller
framework, i want to include my view file.
i copied the code from codeigniter
, then i edited it:
if( ! is_file($file_location)){
throw new Exception("`$name` is Not Found in Views");
}
$output = (function (): string {
// extract($data);
ob_start();
include $file_location;
return ob_get_clean() ?: '';
})();// this is line 25
and i get an exception and i caught it:
Error:Path cannot be empty
line 25
function {closure}