当前位置: 首页>>代码示例>>PHP>>正文


PHP Smarty::_IS_WINDOWS方法代码示例

本文整理汇总了PHP中Smarty::_IS_WINDOWS方法的典型用法代码示例。如果您正苦于以下问题:PHP Smarty::_IS_WINDOWS方法的具体用法?PHP Smarty::_IS_WINDOWS怎么用?PHP Smarty::_IS_WINDOWS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Smarty的用法示例。


在下文中一共展示了Smarty::_IS_WINDOWS方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unmuteExpectedErrors

        if ($previous !== $error_handler) {
            Smarty::$_previous_error_handler = $previous;
        }
    }
    /**
     * Disable error handler muting expected messages
     *
     * @return void
     */
    public static function unmuteExpectedErrors()
    {
        restore_error_handler();
    }
}
// Check if we're running on windows
Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
// let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8
if (Smarty::$_CHARSET !== 'UTF-8') {
    Smarty::$_UTF8_MODIFIER = '';
}
/**
 * Smarty exception class
 * @package Smarty
 */
class SmartyException extends Exception
{
    public static $escape = true;
    public function __construct($message)
    {
        $this->message = self::$escape ? htmlentities($message) : $message;
    }
开发者ID:asd123freedom,项目名称:DragAndDrop,代码行数:31,代码来源:Smarty.class.php

示例2: __construct

 /**
  * Initialize new Smarty object
  */
 public function __construct()
 {
     if (is_callable('mb_internal_encoding')) {
         mb_internal_encoding(Smarty::$_CHARSET);
     }
     $this->start_time = microtime(true);
     // check default dirs for overloading
     if ($this->template_dir[0] !== './templates/' || isset($this->template_dir[1])) {
         $this->setTemplateDir($this->template_dir);
     }
     if ($this->config_dir[0] !== './configs/' || isset($this->config_dir[1])) {
         $this->setConfigDir($this->config_dir);
     }
     if ($this->compile_dir !== './templates_c/') {
         unset(self::$_muted_directories['./templates_c/']);
         $this->setCompileDir($this->compile_dir);
     }
     if ($this->cache_dir !== './cache/') {
         unset(self::$_muted_directories['./cache/']);
         $this->setCacheDir($this->cache_dir);
     }
     if (isset($this->plugins_dir)) {
         $this->setPluginsDir($this->plugins_dir);
     } else {
         $this->setPluginsDir(SMARTY_PLUGINS_DIR);
     }
     if (isset($_SERVER['SCRIPT_NAME'])) {
         Smarty::$global_tpl_vars['SCRIPT_NAME'] = new Smarty_Variable($_SERVER['SCRIPT_NAME']);
     }
     // Check if we're running on windows
     Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
     // let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8
     if (Smarty::$_CHARSET !== 'UTF-8') {
         Smarty::$_UTF8_MODIFIER = '';
     }
 }
开发者ID:simple8888,项目名称:rm,代码行数:39,代码来源:Smarty.class.php

示例3: __construct

 /**
  * Initialize new Smarty object
  */
 public function __construct()
 {
     if (is_callable('mb_internal_encoding')) {
         mb_internal_encoding(Smarty::$_CHARSET);
     }
     $this->start_time = microtime(true);
     if (isset($_SERVER['SCRIPT_NAME'])) {
         Smarty::$global_tpl_vars['SCRIPT_NAME'] = new Smarty_Variable($_SERVER['SCRIPT_NAME']);
     }
     // Check if we're running on windows
     Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
     // let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8
     if (Smarty::$_CHARSET !== 'UTF-8') {
         Smarty::$_UTF8_MODIFIER = '';
     }
 }
开发者ID:redaxle,项目名称:smarty,代码行数:19,代码来源:Smarty.class.php

示例4: __construct

 /**
  * Initialize new Smarty object
  */
 public function __construct()
 {
     if (is_callable('mb_internal_encoding')) {
         mb_internal_encoding(Smarty::$_CHARSET);
     }
     $this->start_time = microtime(true);
     // check default dirs for overloading
     $this->setTemplateDir(APPPATH . 'views/');
     if ($this->config_dir[0] !== './configs/' || isset($this->config_dir[1])) {
         $this->setConfigDir($this->config_dir);
     }
     unset(self::$_muted_directories['./templates_c/']);
     $this->setCompileDir(APPPATH . 'Runtime/compile/');
     unset(self::$_muted_directories['./cache/']);
     $this->setCacheDir(APPPATH . 'Runtime/cache/');
     if (isset($this->plugins_dir)) {
         $this->setPluginsDir($this->plugins_dir);
     } else {
         $this->setPluginsDir(SMARTY_PLUGINS_DIR);
     }
     if (isset($_SERVER['SCRIPT_NAME'])) {
         Smarty::$global_tpl_vars['SCRIPT_NAME'] = new Smarty_Variable($_SERVER['SCRIPT_NAME']);
     }
     // Check if we're running on windows
     Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
 }
开发者ID:smallp,项目名称:fishing,代码行数:29,代码来源:Smarty.php


注:本文中的Smarty::_IS_WINDOWS方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。