function V($name){
require_once('/libs/View/'.$name.'View.class.php');
eval('$obj = new '.$name.'View();');

return $obj;
}


//eval方便但是不安全,可以用以下代替:
$view = $name.'View';
$obj = new $view();
}

相关文章:

  • 2022-12-23
  • 2021-11-03
  • 2021-09-27
  • 2021-10-03
  • 2022-02-09
  • 2022-12-23
  • 2021-08-08
  • 2021-06-27
猜你喜欢
  • 2022-02-07
  • 2021-10-20
  • 2021-06-22
  • 2022-12-23
  • 2023-03-19
  • 2021-07-09
相关资源
相似解决方案