选择语言 :

 Core_View::set_filename

设置视图文件名

 $view = new View();
 $view->set_filename('test_view');
View Core_View::set_filename( string $file )
throws
Exception

参数列表

参数 类型 描述 默认值
$file string $file
返回值
  • View
File: ./core/classes/view.class.php
public function set_filename($file)
{
    $realfile = Core::find_file('views', $file);

    if ($realfile)
    {
        $this->_file = $realfile;
    }
    else
    {
        throw new Exception(__('The view :file does not exist', array(':file'=>$file)));
    }

    return $this;
}