标签:tool ceo info static 获取 ati error 实例化 rect
<?php //跳转类 class Redirect { //用于存放实例化的对象 static private $_instance = null; //公共静态方法获取实例化的对象 static public function getInstance() { if (!(self::$_instance instanceof self)) { self::$_instance = new self(); self::$_instance->_tpl = $_tpl; } return self::$_instance; } //私有克隆 private function __clone() {} //私有构造 private function __construct() {} //成功跳转 public function succ() { $this->_tpl->assign(‘message‘, $_info); $this->_tpl->assign(‘url‘, $_url); $this->_tpl->display(SMARTY_ADMIN.‘public/succ.tpl‘); exit(); } //失败返回 public function error($_info) { $this->_tpl->assign(‘message‘, $_info); $this->_tpl->assign(‘prev‘, Tool::getPrevPage()); $this->_tpl->display(SMARTY_ADMIN.‘public/error.tpl‘); exit(); } } ?>
标签:tool ceo info static 获取 ati error 实例化 rect
原文地址:http://www.cnblogs.com/xujing6/p/6078967.html