core.process_compiled_include.php
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:1k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. <?php
  2. /**
  3.  * Smarty plugin
  4.  * @package Smarty
  5.  * @subpackage plugins
  6.  */
  7. /**
  8.  * Replace nocache-tags by results of the corresponding non-cacheable
  9.  * functions and return it
  10.  *
  11.  * @param string $compiled_tpl
  12.  * @param string $cached_source
  13.  * @return string
  14.  */
  15. function smarty_core_process_compiled_include($params, &$smarty)
  16. {
  17.     $_cache_including = $smarty->_cache_including;
  18.     $smarty->_cache_including = true;
  19.     $_return = $params['results'];
  20.     foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) {
  21.         $_return = preg_replace_callback('!({nocache:('.$_cache_serial.')#(d+)})!s',
  22.                                          array(&$smarty, '_process_compiled_include_callback'),
  23.                                          $_return);
  24.     }
  25.     $smarty->_cache_including = $_cache_including;
  26.     return $_return;
  27. }
  28. ?>