當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。