当前位置: 首页 > news >正文

建设银行信用卡管理中心网站首页网站开发不兼容ie8

建设银行信用卡管理中心网站首页,网站开发不兼容ie8,模板网站没有源代码,互联网时代 网站建设Yaf 结合用户自定义的视图(模板)引擎Smarty(Yaf Smarty)来源#xff1a;互联网作者#xff1a;佚名时间#xff1a;2015-08-06 07:55对完成某个任务进行计时可使用progress_timer类#xff0c;这个类对象在退出作用范围后#xff0c;会输出对象创建后过去的时间#xff…Yaf 结合用户自定义的视图(模板)引擎Smarty(Yaf Smarty)来源互联网作者佚名时间2015-08-06 07:55对完成某个任务进行计时可使用progress_timer类这个类对象在退出作用范围后会输出对象创建后过去的时间可申请多个类对象这样可对多个任务进行统计。#incYaf 结合用户自定义的视图(模板)引擎Smarty(Yaf Smarty)分类php开发yafsmarty(1)入口文件/public/index.php:define(DS, /);define(APPLICATION_PATH, dirname(__FILE__).DS....DS);//指向public上一级的目录 ../$application new Yaf_Application( APPLICATION_PATH . /conf/application.ini);$application-bootstrap()-run();?(2)在引导程序class Bootstrap extends Yaf_Bootstrap_Abstract{public function _initConfig() {//把配置保存起来$arrConfig Yaf_Application::app()-getConfig();Yaf_Registry::set(config, $arrConfig);}//其他定义忽略......public function _initSmarty(Yaf_Dispatcher $dispatcher) {//init smarty view engine$smarty new Smarty_Adapter(null, Yaf_Registry::get(config)-get(smarty));$dispatcher-setView($smarty);}}(3)添加类使Smarty_Adapter首先下载vim Adapter.php/*确保Smarty.class.php在Smarty/libs/下*/Yaf_Loader::import( Smarty/libs/Smarty.class.php); /*基类目录为library*/class Smarty_Adapter implements Yaf_View_Interface /*Smarty_Adapter类为yaf与smarty之间的适配器*/{/*** Smarty object* var Smarty*/public $_smarty;/*** Constructor** param string $tmplPath* param array $extraParams* return void*/public function __construct($tmplPath null, $extraParams array()) {$this-_smarty new Smarty;if (null ! $tmplPath) {$this-setScriptPath($tmplPath);}foreach ($extraParams as $key $value) {$this-_smarty-$key $value;}}/*** Return the template engine object** return Smarty*/public function getEngine() {return $this-_smarty;}/*** Set the path to the templates** param string $path The directory to set as the path.* return void*/public function setScriptPath($path){if (is_readable($path)) {$this-_smarty-template_dir $path;return;}throw new Exception(Invalid path provided);}/*** Retrieve the current template directory** return string*/public function getScriptPath(){return $this-_smarty-template_dir;}/*** Alias for setScriptPath** param string $path* param string $prefix Unused* return void*/public function setBasePath($path, $prefix Zend_View){return $this-setScriptPath($path);}/*** Alias for setScriptPath** param string $path* param string $prefix Unused* return void*/public function addBasePath($path, $prefix Zend_View){return $this-setScriptPath($path);}/*** Assign a variable to the template** param string $key The variable name.* param mixed $val The variable value.* return void*/public function __set($key, $val){$this-_smarty-assign($key, $val);}/*** Allows testing with empty() and isset() to work** param string $key* return boolean*/public function __isset($key){return (null ! $this-_smarty-get_template_vars($key));}/*** Allows unset() on object properties to work** param string $key* return void*/public function __unset($key){$this-_smarty-clear_assign($key);}/*** Assign variables to the template** Allows setting a specific key to the specified value, OR passing* an array of key value pairs to set en masse.** see __set()* param string|array $spec The assignment strategy to use (key or* array of key value pairs)* param mixed $value (Optional) If assigning a named variable,* use this as the value.* return void*/public function assign($spec, $value null) {if (is_array($spec)) {$this-_smarty-assign($spec);return;}$this-_smarty-assign($spec, $value);}/*** Clear all assigned variables** Clears all variables assigned to Zend_View either via* {link assign()} or property overloading* ({link __get()}/{link __set()}).** return void*/public function clearVars() {$this-_smarty-clear_all_assign();}/*** Processes a template and returns the output.** param string $name The template to process.* return string The output.*/public function render($name, $value NULL) {return $this-_smarty-fetch($name);}public function display($name, $value NULL) {echo $this-_smarty-fetch($name);}}?(4)修改vim application.ini[common]application.directory APPLICATION_PATH /applicationapplication.dispatcher.catchException TRUEapplication.bootstrap APPLICATION_PATH /application/Bootstrap.phpapplication.library APPLICATION_PATH /application/libraryapplication.baseUri ;application.dispatcher.defaultModule indexapplication.dispatcher.defaultController indexapplication.dispatcher.defaultAction index;errors (see Bootstrap::initErrors)application.showErrors0[smarty : common]application.view.exttpl ;;设置视图文件的后缀为 tpl;smarty.left_delimiter {{ ;设置模板提取值时候的{情况;smarty.right_delimiter }} ;smarty.template_dir APPLICATION_PATH /application/views/smarty.compile_dir APPLICATION_PATH /application/views/templates_c/smarty.cache_dir APPLICATION_PATH /application/views/templates_d/;smarty.caching 0;;smarty.cache_lifetime 600;[product : smarty](5)基于Yaf  Smarty
http://wiki.neutronadmin.com/news/211061/

相关文章:

  • 免费推广网站下载伊利集团的网站建设水平评价
  • 江苏省建设局网站首页调用百度地图做全景的网站
  • 怎样自己做代刷网站微信小程序介绍
  • pw域名网站温州品牌网站建设
  • 网站推广关键词排名怎么免费做个人网站
  • 深圳网站设计公司设计wordpress登录无效用户名
  • 个人怎样免费建网站幻影图片一键制作网站
  • 做标志的网站考幼师证去哪个网站做试题
  • win7 iis添加网站济南做网站最好的公司
  • 昌平网站建设推广优化seowordpress主题 单页
  • 外贸网站制作要求揭阳网站免费建站
  • 本地linux做网站六安网站制作多少钱
  • 网站做seo多少钱微信小程序跳转到网站
  • logo网站设计素材微妙音门户网站建设
  • 深圳网站 建设信科网络大学生网页设计期末作品代码
  • 卡片式设计的网站网站后台上传图片无法显示
  • 站长工具seo综合查询 分析现在阳性最新情况
  • wordpress 小程序主题seo 怎么做到百度首页
  • 上海网站群建设丽水集团网站建设
  • 网站建设与维护经营范围优设
  • php网站二次开发用什么软件手机网站图片自适应代码
  • 亚马逊欧洲站入口网址页面设计素材网站
  • 沧州北京网站建设阿里巴巴企业网站注册
  • 南京企业网站设计公司500元济源网站开发
  • 百度做网站好吗光谷网站建设哪家好
  • 宁夏住房和城乡建设官方网站百川网站维护
  • 内网网站建设的步骤过程做淘宝客网站好搭建吗?
  • 毕设代做网站招聘深圳东维亚建设公司
  • 未备案网站加速如何降低网站相似度
  • 西城专业网站建设公司哪家好做暖漫画网站