⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 view.php

📁 a short sketch about linux syntex lines.
💻 PHP
字号:
<?php
class Easy_Controller_View{
	public $viewPath = '';
	public $ViewSuffix = '.htm';
	public $complie;
	public $basedir = '/';
	public $installdir;
	public $error;
	public $message;
	public $printpage;	//分页数据
	public $temporary;	//临时数据存放
	public $skin;
	public $jumpurl;
	public $button;
	public $subject;
	public $meta;
	public $_Vodcms;
	public $parentid;
	public $querys;
	public $url;
	function __construct(){
		$this->complie = new Easy_View_Default();
	}
	/*设置模板文件根目录位置*/
	function setViewRoot($path){
		$this->viewPath = $path;
	}
	/*获取模板文件路径*/
	function getViewRoot(){
		return $this->viewPath;
	}
	function Render($filename){
		ob_start();
		$this->complie->basedir = $this->basedir;
		$this->complie->skins = $this->basedir.$this->viewPath.'/'.$this->skin;
		if (is_object($this->_Vodcms)){
			$this->printPage = &$this->_Vodcms->printPage;
		}
		include $this->complie->display($this->viewPath.DIRECTORY_SEPARATOR.strtolower($filename).$this->ViewSuffix);
		return ob_get_clean();

	}
	function Redirect($uri = null){
		if (is_null($uri)) $uri = $_SERVER['HTTP_REFERER'];
		header("location:{$this->installdir}$uri");
	}
	public function __set($key, $value){
		$this->$key = $value;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -