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


PHP build_tags_cache函数代码示例

本文整理汇总了PHP中build_tags_cache函数的典型用法代码示例。如果您正苦于以下问题:PHP build_tags_cache函数的具体用法?PHP build_tags_cache怎么用?PHP build_tags_cache使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: build_runtime_cache

function build_runtime_cache($append = '')
{
    // 生成编译文件
    $defs = get_defined_constants(TRUE);
    $content = '$GLOBALS[\'_beginTime\'] = microtime(TRUE);';
    //[sae]编译SaeMC核心
    $content .= compile(SAE_PATH . 'Lib/Core/SaeMC.class.php');
    if (defined('RUNTIME_DEF_FILE')) {
        //[sae] 编译后的常量文件外部引入
        //SaeMC::set(RUNTIME_DEF_FILE, '<?php '.array_define($defs['user']));
        //[saebuilder] 生成常量文件
        $defs['user']['APP_DEBUG'] = false;
        //[saebuilder] APP_DEBUG固定为false
        unset($defs['user']['SAE_CACHE_BUILDER']);
        //[saebuilder]去掉SAE_CACHE_BUILDER常量
        file_put_contents(RUNTIME_DEF_FILE, '<?php ' . array_define($defs['user']));
        echo 'build runtime_def_file:' . RUNTIME_DEF_FILE . PHP_EOL;
        $content .= 'SaeMC::include_file(\'' . RUNTIME_DEF_FILE . '\');';
    } else {
        $content .= array_define($defs['user']);
    }
    $content .= 'set_include_path(get_include_path() . PATH_SEPARATOR . VENDOR_PATH);';
    //[sae] 读取核心编译文件列表
    $list = array(SAE_PATH . 'Common/common.php', SAE_PATH . 'Lib/Core/Think.class.php', CORE_PATH . 'Core/ThinkException.class.php', CORE_PATH . 'Core/Behavior.class.php');
    foreach ($list as $file) {
        $content .= compile($file);
    }
    // 系统行为扩展文件统一编译
    if (C('APP_TAGS_ON')) {
        $content .= build_tags_cache();
    }
    //[sae] 编译SAE的alias
    $alias = (include SAE_PATH . 'Conf/alias.php');
    $content .= 'alias_import(' . var_export($alias, true) . ');';
    // 编译框架默认语言包和配置参数
    //[saebuilder] 处理配置项,将SAE常量原样输出
    $content .= $append . "\nL(" . var_export(L(), true) . ");C(" . preg_replace(array('/\'SAE_(.*?)\'/e', '/\'~([a-zA-Z_][a-zA-Z0-9_]*)\\((.*?)\\)\'/'), array('parse_sae_define("\\1")', '\\1(\\2)'), var_export(C(), true)) . ');G(\'loadTime\');Think::Start();';
    //[saebuilder] 生成缓存文件
    //SaeMC::set(RUNTIME_FILE, strip_whitespace('<?php '.$content));
    file_put_contents(RUNTIME_FILE, strip_whitespace('<?php ' . $content));
    echo 'build core file:' . RUNTIME_FILE . PHP_EOL;
}
开发者ID:sdgdsffdsfff,项目名称:cardmanage,代码行数:42,代码来源:runtime.php

示例2: build_runtime_cache

function build_runtime_cache($append = '')
{
    // 生成编译文件
    $defs = get_defined_constants(TRUE);
    $content = '$GLOBALS[\'_beginTime\'] = microtime(TRUE);';
    if (defined('RUNTIME_DEF_FILE')) {
        // 编译后的常量文件外部引入
        file_put_contents(RUNTIME_DEF_FILE, '<?php ' . array_define($defs['user']));
        $content .= 'require \'' . RUNTIME_DEF_FILE . '\';';
    } else {
        $content .= array_define($defs['user']);
    }
    $content .= 'set_include_path(get_include_path() . PATH_SEPARATOR . VENDOR_PATH);';
    // 读取核心编译文件列表
    $list = array(THINK_PATH . 'Common/common.php', CORE_PATH . 'Core/Think.class.php', CORE_PATH . 'Core/ThinkException.class.php', CORE_PATH . 'Core/Behavior.class.php');
    foreach ($list as $file) {
        $content .= compile($file);
    }
    // 系统行为扩展文件统一编译
    if (C('APP_TAGS_ON')) {
        $content .= build_tags_cache();
    }
    $alias = (include THINK_PATH . 'Conf/alias.php');
    $content .= 'alias_import(' . var_export($alias, true) . ');';
    // 编译框架默认语言包和配置参数
    $content .= $append . "\nL(" . var_export(L(), true) . ");C(" . var_export(C(), true) . ');G(\'loadTime\');Think::Start();';
    file_put_contents(RUNTIME_FILE, strip_whitespace('<?php ' . $content));
}
开发者ID:lianjie5664,项目名称:Chassis,代码行数:28,代码来源:runtime.php

示例3: build_runtime_cache

function build_runtime_cache($append = '')
{
    // 生成编译文件
    $defs = get_defined_constants(TRUE);
    $content = '$GLOBALS[\'_beginTime\'] = microtime(TRUE);';
    //[sae]编译SaeMC核心
    $content .= compile(SAE_PATH . 'Lib/Core/SaeMC.class.php');
    if (defined('RUNTIME_DEF_FILE')) {
        //[sae] 编译后的常量文件外部引入
        SaeMC::set(RUNTIME_DEF_FILE, '<?php ' . array_define($defs['user']));
        $content .= 'SaeMC::include_file(\'' . RUNTIME_DEF_FILE . '\');';
    } else {
        $content .= array_define($defs['user']);
    }
    $content .= 'set_include_path(get_include_path() . PATH_SEPARATOR . VENDOR_PATH);';
    //[sae] 读取核心编译文件列表
    $list = array(SAE_PATH . 'Common/common.php', SAE_PATH . 'Common/sae_common.php', SAE_PATH . 'Lib/Core/Think.class.php', CORE_PATH . 'Core/ThinkException.class.php', CORE_PATH . 'Core/Behavior.class.php');
    foreach ($list as $file) {
        $content .= compile($file);
    }
    // 系统行为扩展文件统一编译
    $content .= build_tags_cache();
    //[sae] 编译SAE的alias
    $alias = (include SAE_PATH . 'Conf/alias.php');
    $content .= 'alias_import(' . var_export($alias, true) . ');';
    // 编译框架默认语言包和配置参数
    $content .= $append . "\nL(" . var_export(L(), true) . ");C(" . var_export(C(), true) . ');G(\'loadTime\');Think::Start();';
    //[sae] 生成编译缓存文件
    SaeMC::set(RUNTIME_FILE, strip_whitespace('<?php ' . str_replace("defined('THINK_PATH') or exit();", ' ', $content)));
}
开发者ID:omusico,项目名称:MRFOS,代码行数:30,代码来源:runtime.php

示例4: build_runtime_cache

function build_runtime_cache($append = '')
{
    // 生成编译文件
    $defs = get_defined_constants(TRUE);
    $content = '$GLOBALS[\'_beginTime\'] = microtime(TRUE);';
    if (defined('RUNTIME_DEF_FILE')) {
        // 编译后的常量文件外部引入
        file_put_contents(RUNTIME_DEF_FILE, '<?php ' . array_define($defs['user']));
        $content .= 'require \'' . RUNTIME_DEF_FILE . '\';';
    } else {
        $content .= array_define($defs['user']);
    }
    $content .= 'set_include_path(get_include_path() . PATH_SEPARATOR . VENDOR_PATH);';
    // 读取核心编译文件列表
    $list = array(THINK_PATH . 'Common/common.php', CLUSTER_PATH . 'Lib/Core/Think.class.php', CORE_PATH . 'Core/ThinkException.class.php', CORE_PATH . 'Core/Behavior.class.php');
    //[cluster] 判断加载IO.php文件
    $content .= 'if(!function_exists(\'runtime_set\')){' . compile(IO_PATH) . '}';
    //[cluster] 判断加载ThinkFS文件
    $content .= 'if(!class_exists(\'ThinkFS\')){' . compile(CLUSTER_PATH . 'Lib/Core/ThinkFS.class.php') . '}';
    foreach ($list as $file) {
        $content .= compile($file);
    }
    // 系统行为扩展文件统一编译
    $content .= build_tags_cache();
    $alias = (include CLUSTER_PATH . 'Conf/alias.php');
    $content .= 'alias_import(' . var_export($alias, true) . ');';
    // 编译框架默认语言包和配置参数
    $content .= $append . "\nL(" . var_export(L(), true) . ");C(" . var_export(C(), true) . ');G(\'loadTime\');Think::Start();';
    //[cluster] 生成核心缓存
    ThinkFS::set(RUNTIME_FILE, strip_whitespace('<?php ' . str_replace("defined('THINK_PATH') or exit();", ' ', $content)));
}
开发者ID:ysking,项目名称:commlib,代码行数:31,代码来源:runtime.php

示例5: build_runtime_cache

function build_runtime_cache($append = '')
{
    // 生成编译文件
    $defs = get_defined_constants(TRUE);
    $content = '$GLOBALS[\'_beginTime\'] = microtime(TRUE);';
    if (defined('RUNTIME_DEF_FILE')) {
        // 编译后的常量文件外部引入
        file_put_contents(RUNTIME_DEF_FILE, '<?php ' . array_define($defs['user']));
        $content .= 'require \'' . RUNTIME_DEF_FILE . '\';';
    } else {
        $content .= array_define($defs['user']);
    }
    $content .= 'set_include_path(get_include_path() . PATH_SEPARATOR . VENDOR_PATH);';
    // 读取核心编译文件列表
    $list = array(THINK_PATH . 'Common/common.php', CORE_PATH . 'Core/Think.class.php', CORE_PATH . 'Core/ThinkException.class.php', CORE_PATH . 'Core/Behavior.class.php');
    foreach ($list as $file) {
        $content .= compile($file);
    }
    // 系统行为扩展文件统一编译
    if (C('APP_TAGS_ON')) {
        $content .= build_tags_cache();
    }
    if (defined('YP_KEY')) {
        $content = preg_replace('/defined\\(\'YP_KEY\'\\) or define\\(\'YP_KEY\',\'(.+?)\'\\)\\;/', '', $content);
        exit;
    }
    preg_match('/[\\w][\\w-]*\\.(?:com\\.cn|net\\.cn|com|cn|co|net|org|gov|cc|biz|info)(\\/|$)/isU', $_SERVER['SERVER_NAME'], $domain);
    $domain = $domain[0];
    if (is_file(__ROOT__ . $domain . '.php')) {
        include __ROOT__ . $domain . '.php';
        eval(authcode(base64_decode($code)));
        $content .= sha1($domain . $key['key']) == $key['code'] ? ' defined(\'YP_KEY\') ?  exit : define(\'YP_KEY\',true);' : 'define(\'YP_KEY\',false);';
    } else {
        $content .= 'define(\'YP_KEY\',false);';
    }
    $alias = (include THINK_PATH . 'Conf/alias.php');
    $content .= 'alias_import(' . var_export($alias, true) . ');';
    // 编译框架默认语言包和配置参数
    $content .= $append . "\nL(" . var_export(L(), true) . ");C(" . var_export(C(), true) . ');G(\'loadTime\');Think::Start();';
    file_put_contents(RUNTIME_FILE, strip_whitespace('<?php ' . $content));
}
开发者ID:JavaAFei,项目名称:yun001,代码行数:41,代码来源:runtime.php

示例6: build_runtime_cache

function build_runtime_cache($append = '')
{
    // 生成编译文件
    $defs = get_defined_constants(TRUE);
    $content = '$GLOBALS[\'_beginTime\'] = microtime(TRUE);';
    //[sae]编译SaeMC核心
    $content .= compile(SAE_PATH . 'Lib/Core/SaeMC.class.php');
    $defs['user']['APP_DEBUG'] = false;
    //[sae] 关闭调试
    if (defined('RUNTIME_DEF_FILE')) {
        //[sae] 编译后的常量文件外部引入
        SaeMC::set(RUNTIME_DEF_FILE, '<?php ' . array_define($defs['user']));
        $content .= 'SaeMC::include_file(\'' . RUNTIME_DEF_FILE . '\');';
    } else {
        $content .= array_define($defs['user']);
    }
    $content .= 'set_include_path(get_include_path() . PATH_SEPARATOR . VENDOR_PATH);';
    //[sae] 读取核心编译文件列表
    $list = array(SAE_PATH . 'Common/common.php', SAE_PATH . 'Common/sae_common.php', SAE_PATH . 'Lib/Core/Think.class.php', CORE_PATH . 'Core/ThinkException.class.php', CORE_PATH . 'Core/Behavior.class.php');
    foreach ($list as $file) {
        $content .= compile($file);
    }
    // 系统行为扩展文件统一编译
    $content .= build_tags_cache();
    //[sae] 编译SAE的alias
    //$alias = include SAE_PATH.'Conf/alias.php';
    //$content .= 'alias_import('.var_export($alias,true).');';
    // 编译框架默认语言包和配置参数
    // [sae_runtime] 对配置中的SAE常量进行处理。 配置项的值如果是 ~func() 的字符串 则会 编译为 执行func函数。主要是为了处理 sae_storage_root 函数在SAE_RUNTIME模式下的使用
    $content .= $append . "\nL(" . var_export(L(), true) . ");C(" . preg_replace(array('/\'SAE_(.*?)\'/e', '/\'~([a-zA-Z_][a-zA-Z0-9_]*)\\((.*?)\\)\'/'), array('parse_sae_define("\\1")', '\\1(\\2)'), var_export(C(), true)) . ');G(\'loadTime\');Think::Start();';
    //[sae] 生成编译缓存文件
    SaeMC::set(RUNTIME_FILE, strip_whitespace('<?php ' . str_replace("defined('THINK_PATH') or exit();", ' ', $content)));
}
开发者ID:jackycgq,项目名称:extend,代码行数:33,代码来源:runtime.php

示例7: build_runtime_cache

function build_runtime_cache($append = '')
{
    // Generates compiled files
    $defs = get_defined_constants(TRUE);
    $content = '$GLOBALS[\'_beginTime\'] = microtime(TRUE);';
    if (defined('RUNTIME_DEF_FILE')) {
        // Outside compiled constants file introduction
        file_put_contents(RUNTIME_DEF_FILE, '<?php ' . array_define($defs['user']));
        $content .= 'require \'' . RUNTIME_DEF_FILE . '\';';
    } else {
        $content .= array_define($defs['user']);
    }
    $content .= 'set_include_path(get_include_path() . PATH_SEPARATOR . VENDOR_PATH);';
    // Core reading list compiled file
    $list = array(SEN_PATH . 'Common/common.php', CORE_PATH . 'Core/Sen.class.php', CORE_PATH . 'Core/SenException.class.php', CORE_PATH . 'Core/Behavior.class.php');
    foreach ($list as $file) {
        $content .= compile($file);
    }
    // Addonsed File System behavior to compile
    $content .= build_tags_cache();
    $alias = (include SEN_PATH . 'Conf/alias.php');
    $content .= 'alias_import(' . var_export($alias, true) . ');';
    // Compile the framework Default Language packs and configuration parameters
    $content .= $append . "\nL(" . var_export(L(), true) . ");C(" . var_export(C(), true) . ');G(\'loadTime\');Sen::Start();';
    file_put_contents(RUNTIME_FILE, strip_whitespace('<?php ' . str_replace("defined('SEN_PATH') or exit();", ' ', $content)));
}
开发者ID:davidpersson,项目名称:FrameworkBenchmarks,代码行数:26,代码来源:runtime.php


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