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


PHP keke_tpl_class::sreadfile方法代码示例

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


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

示例1: defined

<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(51);
$filename = S_ROOT . './tpl/' . $tplname . '/' . $tname;
$code_content = htmlspecialchars(keke_tpl_class::sreadfile($filename));
if ($sbt_edit) {
    $filename = S_ROOT . $tname;
    if (!is_writable($filename)) {
        kekezu::admin_show_msg($_lang['file'] . $filename . $_lang['can_not_write_please_check'], "index.php?do=tpl&view=tpllist&tplname={$tplname}", 3, '', 'warning');
    }
    keke_tpl_class::swritefile($filename, htmlspecialchars_decode(kekezu::k_stripslashes($txt_code_content)));
    kekezu::admin_system_log($_lang['edit_template'] . $tplname . '/' . $tname);
    kekezu::admin_show_msg($_lang['tpl_edit_success'], "index.php?do=tpl&view=tpllist&tplname={$tplname}", 3, '', 'success');
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_tpl_' . $view);
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:16,代码来源:admin_tpl_edit_tpl.php

示例2: mysql_query

 }
 if (mysql_get_server_info() > '4.1') {
     mysql_query("CREATE DATABASE IF NOT EXISTS `{$dbname}` DEFAULT CHARACTER SET " . DBCHARSET, $link);
 } else {
     mysql_query("CREATE DATABASE IF NOT EXISTS `{$dbname}`", $link);
 }
 if (mysql_errno()) {
     $error_arr['dbname'] = 'database_errno_1044' . mysql_error();
     include INSTALL_ROOT . 'tpl' . DIRECTORY_SEPARATOR . 'sql.tpl.php';
     break;
 }
 mysql_close($link);
 $db = new db_tool();
 $db->connect($dbhost, $dbuser, $dbpw, $dbname, DBCHARSET);
 $temp_arr = array("dbhost" => $dbhost, "dbname" => $dbname, "dbuser" => $dbuser, "dbpass" => $dbpw, "tablepre" => $tablepre, 'cookie_path' => $c_path);
 $config_content = keke_tpl_class::sreadfile($config_path);
 foreach ($temp_arr as $key => $value) {
     $key = strtoupper($key);
     $config_content = preg_replace("/define\\s?+\\(\\s?+'({$key})'\\s?+,\\s?+.*'\\s?+\\);/i", "define ( '{$key}', '{$value}');", $config_content);
 }
 keke_tpl_class::swritefile($config_path, $config_content);
 // 写配置文件
 if ($data_type == 'b') {
     // 带演示版本
     $sqlfile = $sqldemofile;
 }
 $sql = file_get_contents($sqlfile);
 $sql = str_replace("\r\n", "\n", $sql);
 include INSTALL_ROOT . 'tpl' . DIRECTORY_SEPARATOR . $step . '.tpl.php';
 runquery($sql, $tablepre, $db);
 // ob
开发者ID:xupnge1314,项目名称:project,代码行数:31,代码来源:index.php

示例3: urlencode

            }
            $postdata = "m=app&a=add&ucfounder=&ucfounderpw=" . urlencode($ucfounderpw) . "&apptype=" . urlencode($app_type) . "&appname=" . urlencode($app_name) . "&appurl=" . urlencode($app_url) . "&appip=&appcharset=" . CHARSET . '&appdbcharset=' . DBCHARSET . '&' . $app_tagtemplates . '&release=' . UC_CLIENT_RELEASE;
            $ucconfig = uc_fopen($ucapi . '/index.php', 500, $postdata, '', 1, $ucip);
            if (empty($ucconfig)) {
                kekezu::admin_show_msg($_lang['uc_app_fail_to_add'], 'index.php?do=config&view=integration&type=uc', '', 3, 'warning');
            } elseif ($ucconfig == '-1') {
                kekezu::admin_show_msg($_lang['uc_error_author_password'], 'index.php?do=config&view=integration&type=uc', 3, '', 'warning');
            } else {
                list($appauthkey, $appid) = explode('|', $ucconfig);
                if (empty($appauthkey) || empty($appid)) {
                    kekezu::admin_system_log($_lang['add_log_msg']);
                    kekezu::admin_show_msg(keke::lang('uc_app_invalid_to_add'), 'index.php?do=config&view=integration&type=uc', 3, '', 'success');
                }
            }
        }
        $ucconfig_info = explode('|', $ucconfig);
        $config_ucenter = keke_tpl_class::sreadfile(S_ROOT . "/config/config_ucenter.php");
        $config_ucenter = preg_replace("/define\\('UC_KEY',\\s*'.*?'\\);/s", "define('UC_KEY', '" . $ucconfig_info['0'] . "');", $config_ucenter);
        $config_ucenter = preg_replace("/define\\('UC_APPID',\\s*'*.*?'*\\);/s", "define('UC_APPID', " . $ucconfig_info[1] . ");", $config_ucenter);
        keke_tpl_class::swritefile(S_ROOT . "/config/config_ucenter.php", $config_ucenter);
        $config_obj->setWhere(" k = 'user_intergration'");
        $config_obj->setV(2);
        $config_obj->edit_keke_witkey_basic_config();
        $kekezu->_cache_obj->gc();
        kekezu::admin_system_log($_lang['uc_integrate_log']);
        kekezu::admin_show_msg($_lang['uc_integrate_success'], "index.php?do=config&view=integration", 2, '', 'success');
    }
    require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view . '_uc');
    die;
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view);
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:31,代码来源:admin_config_integration.php


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