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


PHP kekezu::json_encode_k方法代码示例

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


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

示例1: upload_file

 public static function upload_file($file_name, $ext = '', $isr = 1, $folder = '', $output = 'normal')
 {
     global $_lang, $kekezu;
     if ($_FILES[$file_name]['size']) {
         $ext == '' && ($ext = $kekezu->_sys_config['file_type']);
         if ($folder != '') {
             $absolute_path = S_ROOT . '/data/uploads/sys/' . $folder;
             $filepath = 'data/uploads/sys/' . $folder;
         } else {
             $absolute_path = UPLOAD_ROOT;
             $filepath = 'data/uploads/' . UPLOAD_RULE;
         }
         $upload_obj = new keke_upload_class($absolute_path, explode('|', $ext), UPLOAD_MAXSIZE);
         $files = $upload_obj->run($file_name, $isr);
         if (!empty($files) && is_array($files)) {
             $file = $files[0]['saveName'];
             return $filepath . $file;
         } else {
             $err = $files;
             switch ($output) {
                 case "normal":
                     kekezu::show_msg($_lang['operate_notice'], '', 2, $err, 'warning');
                     break;
                 case "json":
                     echo kekezu::json_encode_k(array('err' => $err));
                     die;
                     break;
             }
         }
     }
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:31,代码来源:keke_file_class.php

示例2: defined

<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(41);
$nav_list = kekezu::get_table_data('*', 'witkey_nav', '', 'listorder', '', '', "nav_id");
$nav_list_json = kekezu::json_encode_k(kekezu::gbktoutf($nav_list));
$nav_obj = new keke_table_class("witkey_nav");
$url = "index.php?do={$do}&view={$view}";
if ($ac == 'edit') {
    if (!empty($nav_id)) {
        $sql = sprintf("select * from %switkey_nav where nav_id ='%d' limit 0,1", TABLEPRE, $nav_id);
        $nav_config = db_factory::get_one($sql);
        $readonly = nav_analysis($nav_config['nav_url']);
    }
    if ($fds and $sbt_edit) {
        if ($set_index) {
            $set_rs = db_factory::execute(sprintf("update %switkey_basic_config set v='%s' where k='set_index'", TABLEPRE, $fds['nav_style']));
        } else {
            $set_rs = db_factory::execute(sprintf("update %switkey_basic_config set v='index' where k='set_index'", TABLEPRE));
        }
        $res = $nav_obj->save($fds, $pk);
        $res || $set_rs and kekezu::admin_show_msg($_lang['operate_success'], $url, 2, $_lang['edit_success'], "success") or kekezu::admin_show_msg($_lang['operate_fail'], $url, 2, $_lang['edit_fail'], "error");
    }
    require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view . '_edit');
    die;
}
if ($ac == 'del') {
    $nav_obj->del('nav_id', $nav_id, $url);
    kekezu::admin_show_msg($_lang['delete_nav_success'], "index.php?do=config&view=nav", 3, '', 'success');
}
if ($ac == 'set_index') {
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:31,代码来源:admin_config_nav.php


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