q36988 发表于 2018-12-22 15:35:29

PHP中的预定义常量__FILE__

classnew_smarty extends Smarty  {
  /**
   * (功能描述)
   * @Date:
   *@param   (类型)    (参数名)   (描述)
   */
  function new_smarty(){
   $this->smarty;
  
   $dir =dirname(__FILE__);
   $dir =str_replace("\\",'/',$dir);
  
   $this->template_dir ="$dir/templates";
   $this->compile_dir = "$dir/templates_c";
   $this->cache_dir   = "$dir/cache";
   $this->config_dir= "$dir/configs";
  
   $this->cacheing =true;
  
   $this->left_delimiter ='{%';
   $this->right_delimiter ='%}';
  }
  }
  ?>

页: [1]
查看完整版本: PHP中的预定义常量__FILE__