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


PHP Bootstrap::sys_get_temp_dir方法代码示例

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


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

示例1: define

define( 'DEBUG_CALENDAR_LOG', $config['debug_calendar'] );
define( 'MEMCACHED_ENABLED', $config['memcached'] );
define( 'MEMCACHED_SERVER', $config['memcached_server'] );
define( 'TIME_ZONE', $config['time_zone'] );

define ('WS_IN_LOGIN', isset($config['WS_IN_LOGIN']) ? $config['WS_IN_LOGIN'] : 'serverconf');

// IIS Compatibility, SERVER_ADDR doesn't exist on that env, so we need to define it.
$_SERVER['SERVER_ADDR'] = isset( $_SERVER['SERVER_ADDR'] ) ? $_SERVER['SERVER_ADDR'] : $_SERVER['SERVER_NAME'];

//to do: make different environments.  sys

//check if it is a installation instance
if (! defined( 'PATH_C' )) {
// is a intallation instance, so we need to define PATH_C and PATH_LANGUAGECONT constants temporarily
define( 'PATH_C', (rtrim( Bootstrap::sys_get_temp_dir(), PATH_SEP ) . PATH_SEP) );
define( 'PATH_LANGUAGECONT', PATH_HOME . 'engine/content/languages/' );
}

//Load filter class
$skinPathErrors = G::skinGetPathToSrcByVirtualUri("errors", $config);
$skinPathUpdate = G::skinGetPathToSrcByVirtualUri("update", $config);

// defining Virtual URLs
$virtualURITable = array ();
$virtualURITable['/plugin/(*)'] = 'plugin';
$virtualURITable['/(sys*)/(*.js)'] = 'jsMethod';
$virtualURITable['/js/(*)'] = PATH_GULLIVER_HOME . 'js/';
$virtualURITable['/jscore/(*)'] = PATH_CORE . 'js/';

if (defined( 'PATH_C' )) {
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:31,代码来源:sysGeneric.php

示例2: renderTemplate

 /**
  * render a smarty template
  *
  * @author Erik Amaru Ortiz <erik@colosa.com>
  * @param $template string
  *        	containing the template filename on /gulliver/templates/
  *        	directory
  * @param $data associative
  *        	array containig the template data
  */
 public function renderTemplate($template, $data = array())
 {
     if (!defined('PATH_THIRDPARTY')) {
         throw new Exception('System constant (PATH_THIRDPARTY) is not defined!');
     }
     require_once PATH_THIRDPARTY . 'smarty/libs/Smarty.class.php';
     $fInfo = pathinfo($template);
     $tplExists = true;
     // file has absolute path
     if (substr($template, 0, 1) != PATH_SEP) {
         $template = PATH_TEMPLATE . $template;
     }
     // fix for template that have dot in its name but is not a valid
     // extension
     if (isset($fInfo['extension']) && ($fInfo['extension'] != 'tpl' || $fInfo['extension'] != 'html')) {
         unset($fInfo['extension']);
     }
     if (!isset($fInfo['extension'])) {
         if (file_exists($template . '.tpl')) {
             $template .= '.tpl';
         } elseif (file_exists($template . '.html')) {
             $template .= '.html';
         } else {
             $tplExists = false;
         }
     } else {
         if (!file_exists($template)) {
             $tplExists = false;
         }
     }
     if (!$tplExists) {
         throw new Exception("Template: {$template}, doesn't exist!");
     }
     $smarty = new Smarty();
     $smarty->compile_dir = Bootstrap::sys_get_temp_dir();
     $smarty->cache_dir = Bootstrap::sys_get_temp_dir();
     $smarty->config_dir = PATH_THIRDPARTY . 'smarty/configs';
     $smarty->template_dir = PATH_TEMPLATE;
     $smarty->force_compile = true;
     foreach ($data as $key => $value) {
         $smarty->assign($key, $value);
     }
     $smarty->display($template);
 }
开发者ID:norahmollo,项目名称:processmaker,代码行数:54,代码来源:class.bootstrap.php

示例3: renderTemplate

 /**
  * render a smarty template
  *
  * @author Erik Amaru Ortiz <erik@colosa.com>
  * @param $template string
  *        	containing the template filename on /gulliver/templates/
  *        	directory
  * @param $data associative
  *        	array containig the template data
  */
 public static function renderTemplate($template, $data = array())
 {
     if (!defined('PATH_THIRDPARTY')) {
         throw new Exception('System constant (PATH_THIRDPARTY) is not defined!');
     }
     require_once PATH_THIRDPARTY . 'smarty/libs/Smarty.class.php';
     // file has absolute path
     if (substr($template, 0, 1) != PATH_SEP) {
         $template = PATH_TEMPLATE . $template;
     }
     if (!file_exists($template)) {
         throw new Exception("Template: {$template}, doesn't exist!");
     }
     $smarty = new Smarty();
     $smarty->compile_dir = Bootstrap::sys_get_temp_dir();
     $smarty->cache_dir = Bootstrap::sys_get_temp_dir();
     $smarty->config_dir = PATH_THIRDPARTY . 'smarty/configs';
     $smarty->template_dir = PATH_TEMPLATE;
     $smarty->force_compile = true;
     foreach ($data as $key => $value) {
         $smarty->assign($key, $value);
     }
     $smarty->display($template);
 }
开发者ID:rrsc,项目名称:processmaker,代码行数:34,代码来源:class.bootstrap.php


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