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


PHP erLhcoreClassTemplate::strip_html方法代码示例

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


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

示例1: fetch


//.........这里部分代码省略.........
         }
         // Compile override config settings
         $Matches = array();
         preg_match_all('/erConfigClassLhConfig::getInstance\\(\\)->getOverrideValue\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?),(\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $valueConfig = erConfigClassLhConfig::getInstance()->getOverrideValue($Matches[2][$key], $Matches[5][$key]);
             $valueReplace = '';
             if (is_bool($valueConfig)) {
                 $valueReplace = $valueConfig == false ? 'false' : 'true';
             } elseif (is_integer($valueConfig)) {
                 $valueReplace = $valueConfig;
             } elseif (is_array($valueConfig)) {
                 $valueReplace = var_export($valueConfig, true);
             } else {
                 $valueReplace = '\'' . $valueConfig . '\'';
             }
             $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
         }
         $Matches = array();
         preg_match_all('/<\\?php echo erConfigClassLhConfig::getInstance\\(\\)->getDirLanguage\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $valueConfig = erConfigClassLhConfig::getInstance()->getDirLanguage($Matches[2][$key]);
             $valueReplace = '';
             if (is_bool($valueConfig)) {
                 $valueReplace = $valueConfig == false ? 'false' : 'true';
             } elseif (is_integer($valueConfig)) {
                 $valueReplace = $valueConfig;
             } elseif (is_array($valueConfig)) {
                 $valueReplace = var_export($valueConfig, true);
             } else {
                 $valueReplace = $valueConfig;
             }
             $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
         }
         // Compile config settings
         $Matches = array();
         preg_match_all('/erConfigClassLhConfig::getInstance\\(\\)->getDirLanguage\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $var) {
             $valueConfig = erConfigClassLhConfig::getInstance()->getDirLanguage($Matches[2][$key]);
             $valueReplace = '';
             if (is_bool($valueConfig)) {
                 $valueReplace = $valueConfig == false ? 'false' : 'true';
             } elseif (is_integer($valueConfig)) {
                 $valueReplace = $valueConfig;
             } elseif (is_array($valueConfig)) {
                 $valueReplace = var_export($valueConfig, true);
             } else {
                 $valueReplace = '\'' . $valueConfig . '\'';
             }
             $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
         }
         if ($this->cacheDbVariables == true) {
             // Compile config completely
             $Matches = array();
             preg_match_all('/<\\?php echo erLhcoreClassModelChatConfig::fetch\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->current_value(.*?)\\?\\>/i', $contentFile, $Matches);
             foreach ($Matches[1] as $key => $UrlAddress) {
                 $valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->current_value;
                 $contentFile = str_replace($Matches[0][$key], $valueConfig, $contentFile);
             }
             // Compile config settings in php scripts
             $Matches = array();
             preg_match_all('/erLhcoreClassModelChatConfig::fetch\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->current_value/i', $contentFile, $Matches);
             foreach ($Matches[1] as $key => $UrlAddress) {
                 $valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->current_value;
                 $valueReplace = '';
                 $valueReplace = '\'' . str_replace("'", "\\'", $valueConfig) . '\'';
                 $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
             }
             // Compile config settings in php scripts
             $Matches = array();
             preg_match_all('/erLhcoreClassModelChatConfig::fetch\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->data_value/i', $contentFile, $Matches);
             foreach ($Matches[1] as $key => $UrlAddress) {
                 $valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->data_value;
                 $valueReplace = var_export($valueConfig, true);
                 $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
             }
             // Compile config settings array
             $Matches = array();
             preg_match_all('/erLhcoreClassModelChatConfig::fetch\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->data\\[\'([a-zA-Z0-9-\\.-\\/\\_]+)\'\\]/i', $contentFile, $Matches);
             foreach ($Matches[1] as $key => $UrlAddress) {
                 $valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->data[$Matches[4][$key]];
                 $valueReplace = '';
                 $valueReplace = '\'' . str_replace("'", "\\'", $valueConfig) . '\'';
                 $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
             }
         }
         // Compile content language
         $contentFile = str_replace('<?php echo erLhcoreClassSystem::instance()->ContentLanguage?>', erLhcoreClassSystem::instance()->ContentLanguage, $contentFile);
         // Compile siteaccess
         $contentFile = str_replace('erLhcoreClassSystem::instance()->SiteAccess', '\'' . erLhcoreClassSystem::instance()->SiteAccess . '\'', $contentFile);
         // Atomoc template compilation to avoid concurent request compiling and writing to the same file
         $fileName = 'cache/compiledtemplates/' . md5(time() . rand(0, 1000) . microtime() . $file . $instance->WWWDirLang . $instance->Language . $port) . '.php';
         file_put_contents($fileName, erLhcoreClassTemplate::strip_html($contentFile));
         $file = 'cache/compiledtemplates/' . md5($file . $instance->WWWDirLang . $instance->Language . $port) . '.php';
         rename($fileName, $file);
         $this->cacheTemplates[md5($fileTemplate . $instance->WWWDirLang . $instance->Language . $port)] = $file;
         $this->storeCache();
     }
     return $this->fetchExecute($file);
 }
开发者ID:mdb-webdev,项目名称:livehelperchat,代码行数:101,代码来源:tpl.php


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