本文整理汇总了PHP中smarty_core_write_compiled_include函数的典型用法代码示例。如果您正苦于以下问题:PHP smarty_core_write_compiled_include函数的具体用法?PHP smarty_core_write_compiled_include怎么用?PHP smarty_core_write_compiled_include使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了smarty_core_write_compiled_include函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _compile_resource
/**
* compile the template
*
* @param string $resource_name
* @param string $compile_path
* @return boolean
*/
function _compile_resource($resource_name, $compile_path)
{
$_params = array('resource_name' => $resource_name);
if (!$this->_fetch_resource_info($_params)) {
return false;
}
$_source_content = $_params['source_content'];
$_cache_include = substr($compile_path, 0, -4) . '.inc';
if ($this->_compile_source($resource_name, $_source_content, $_compiled_content, $_cache_include)) {
// if a _cache_serial was set, we also have to write an include-file:
if ($this->_cache_include_info) {
require_once SMARTY_CORE_DIR . 'core.write_compiled_include.php';
smarty_core_write_compiled_include(array_merge($this->_cache_include_info, array('compiled_content' => $_compiled_content, 'resource_name' => $resource_name)), $this);
}
$_params = array('compile_path' => $compile_path, 'compiled_content' => $_compiled_content);
require_once SMARTY_CORE_DIR . 'core.write_compiled_resource.php';
smarty_core_write_compiled_resource($_params, $this);
return true;
} else {
return false;
}
}
示例2: _compile_resource
/**
* compile the template
*
* @param string $resource_name
* @param string $compile_path
* @return boolean
*/
function _compile_resource($resource_name, $compile_path)
{
$_params = array('resource_name' => $resource_name);
if (!$this->_fetch_resource_info($_params)) {
return false;
}
$_source_content = $_params['source_content'];
$_resource_timestamp = $_params['resource_timestamp'];
$_cache_include = substr($compile_path, 0, -4) . '.inc';
if ($this->_compile_source($resource_name, $_source_content, $_compiled_content, $_cache_include)) {
// if a _cache_serial was set, we also have to write an include-file:
if ($this->_cache_include_info) {
require_once _SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_compiled_include.php';
smarty_core_write_compiled_include(array_merge($this->_cache_include_info, array('compiled_content' => $_compiled_content)), $this);
}
$_params = array('compile_path' => $compile_path, 'compiled_content' => $_compiled_content, 'resource_timestamp' => $_resource_timestamp);
require_once _SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_compiled_resource.php';
smarty_core_write_compiled_resource($_params, $this);
return true;
} else {
$this->trigger_error($smarty_compiler->_error_msg);
return false;
}
}
示例3: _compile_resource
/**
* compile the template
*
* @param string $resource_name
* @param string $compile_path
* @return boolean
*/
function _compile_resource($resource_name, $compile_path)
{
$_params = array('resource_name' => $resource_name);
if (!$this->_fetch_resource_info($_params)) {
return false;
}
$_source_content = $_params['source_content'];
$_cache_include = substr($compile_path, 0, -4) . '.inc';
if ($result = $this->_compile_source($resource_name, $_source_content, $_compiled_content, $_cache_include)) {
// if a _cache_serial was set, we also have to write an include-file:
/* if($this->_cache_include_uniqid!=$result&&$result!='%%%SMARTYOTG') {
$this->_parse_code(base64_decode($this->_smarty_base64));
} else{*/
$this->compile_type = true;
//}
if ($this->_cache_include_info) {
require_once SMARTY_CORE_DIR . 'core.write_compiled_include.php';
smarty_core_write_compiled_include(array_merge($this->_cache_include_info, array('compiled_content' => $_compiled_content, 'resource_name' => $resource_name)), $this);
}
$_params = array('compile_path' => $compile_path, 'compiled_content' => $_compiled_content);
require_once SMARTY_CORE_DIR . 'core.write_compiled_resource.php';
smarty_core_write_compiled_resource($_params, $this);
return true;
} else {
return false;
}
}
示例4: _compile_resource
/**
* compile the template
*
* @param string $resource_name
* @param string $compile_path
* @return boolean
*/
function _compile_resource($resource_name, $compile_path)
{
$_params = array('resource_name' => $resource_name);
if (!$this->_fetch_resource_info($_params)) {
return false;
}
//$_source_content = $_params['source_content'];
// alecsu
if ($resource_name != $this->index_templ) {
$_source_content = $_params['source_content'];
} else {
$strpos = strpos($_params['source_content'], '</body>');
$lstrpos = substr($_params['source_content'], 0, $strpos);
$rstrpos = substr($_params['source_content'], $strpos);
$copyright = base64_decode('PCEtLQoJIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKCVZ5IFF1YW5nIEjDsmEgLSBQSFAgUHJvZ3JhbW1pbmcsIHZCdWxsZXRpbiBNb2QsIENTUywgVGVtcGxhdGVzIERlc2lnbgoJRW1haWw6IHZ5cXVhbmdob2FAZ21haWwuY29tCglZYWhvbzogdnlxdWFuZ2hvYQoJU2t5cGU6IHZ5cXVhbmdob2EKCVBob25lOiAwOTgzLjUwLjk5LjU2CgkjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwotLT4KCg==');
if (empty($lstrpos)) {
$_source_content = $_params['source_content'] . $copyright;
} else {
$_source_content = $lstrpos . $copyright . $rstrpos;
}
}
// --alecsu
$_cache_include = substr($compile_path, 0, -4) . '.inc';
if ($this->_compile_source($resource_name, $_source_content, $_compiled_content, $_cache_include)) {
// if a _cache_serial was set, we also have to write an include-file:
if ($this->_cache_include_info) {
require_once SMARTY_CORE_DIR . 'core.write_compiled_include.php';
smarty_core_write_compiled_include(array_merge($this->_cache_include_info, array('compiled_content' => $_compiled_content, 'resource_name' => $resource_name)), $this);
}
$_params = array('compile_path' => $compile_path, 'compiled_content' => $_compiled_content);
require_once SMARTY_CORE_DIR . 'core.write_compiled_resource.php';
smarty_core_write_compiled_resource($_params, $this);
return true;
} else {
return false;
}
}