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


PHP iconv_system函数代码示例

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


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

示例1: init_app

 public function init_app($user_info)
 {
     $list = $this->sql->get();
     $new_user_app = $this->config['setting_system']['new_user_app'];
     $default = explode(',', $new_user_app);
     $info = array();
     foreach ($default as $key) {
         $info[$key] = $list[$key];
     }
     $desktop = USER_PATH . $user_info['name'] . '/home/desktop/';
     mk_dir($desktop);
     foreach ($info as $key => $data) {
         if (!is_array($data)) {
             continue;
         }
         $path = iconv_system($desktop . $key . '.oexe');
         unset($data['name']);
         unset($data['desc']);
         unset($data['group']);
         file_put_contents($path, json_encode($data));
     }
     $user_info['status'] = 1;
     $member = new fileCache(USER_SYSTEM . 'member.php');
     $member->update($user_info['name'], $user_info);
 }
开发者ID:zhendeguoke1008,项目名称:OneShop,代码行数:25,代码来源:app.class.php

示例2: _DIR

function _DIR($path)
{
    $path = _DIR_CLEAR(rawurldecode($path));
    $path = iconv_system($path);
    if (substr($path, 0, strlen(PUBLIC_PATH)) == PUBLIC_PATH) {
        return $path;
    }
    $path = HOME . $path;
    if (is_dir($path)) {
        $path .= '/';
    }
    return $path;
}
开发者ID:keycoolkui,项目名称:KODExplorer,代码行数:13,代码来源:util.php

示例3: _DIR

function _DIR($path, $pre_path = HOME)
{
    $path = _DIR_CLEAR(rawurldecode($path));
    $path = iconv_system($path);
    if (is_dir($path)) {
        $path .= '/';
    }
    //公共目录处理
    $share_len = strlen(PUBLIC_PATH);
    if (substr($path, 0, $share_len) == PUBLIC_PATH) {
        $pre_path = '';
        //如果为共享目录 则不追加普通用户的目录前缀
    }
    return $pre_path . $path;
}
开发者ID:longmore,项目名称:KODExplorer,代码行数:15,代码来源:util.php

示例4: _DIR

function _DIR($path)
{
    $path = _DIR_CLEAR(rawurldecode($path));
    $path = iconv_system($path);
    if (substr($path, 0, strlen('*recycle*/')) == '*recycle*/') {
        return USER_RECYCLE . str_replace('*recycle*/', '', $path);
    }
    if (substr($path, 0, strlen('*public*/')) == '*public*/') {
        return PUBLIC_PATH . str_replace('*public*/', '', $path);
    }
    if (substr($path, 0, strlen('*share*/')) == '*share*/') {
        return "*share*/";
    }
    $path = HOME . $path;
    if (is_dir($path)) {
        $path = rtrim($path, '/') . '/';
    }
    return $path;
}
开发者ID:ck8275411,项目名称:KODExplorer,代码行数:19,代码来源:util.php

示例5: init_app

 /**
  * 用户app初始化
  */
 private function init_app($user)
 {
     $sql = new fileCache($this->config['system_file']['apps']);
     $list = $sql->get();
     $desktop = USER_PATH . $user['name'] . '/home/desktop/';
     foreach ($list as $key => $data) {
         $path = iconv_system($desktop . $key . '.oexe');
         unset($data['name']);
         unset($data['desc']);
         unset($data['group']);
         file_put_contents($path, json_encode($data));
     }
     $user['status'] = 1;
     $member = new fileCache($this->config['system_file']['member']);
     $member->update($user['name'], $user);
 }
开发者ID:longmore,项目名称:KODExplorer,代码行数:19,代码来源:user.class.php

示例6: path

 private function path($dir, $list_file = true, $check_children = false)
 {
     $path_hidden = $this->config['setting_system']['path_hidden'];
     $ex_name = explode(',', $path_hidden);
     if (strstr($dir, "*share*")) {
         return $this->path_share();
     }
     $list = path_list($dir, $list_file, $check_children);
     $filelist_new = array();
     $folderlist_new = array();
     foreach ($list['filelist'] as $key => $val) {
         if (in_array($val['name'], $ex_name)) {
             continue;
         }
         if ($val['ext'] == 'oexe') {
             $path = iconv_system($val['path']) . '/' . iconv_system($val['name']);
             $json = json_decode(file_get_contents($path), true);
             if (is_array($json)) {
                 $val = array_merge($val, $json);
             }
         }
         $filelist_new[] = $val;
     }
     foreach ($list['folderlist'] as $key => $val) {
         if (in_array($val['name'], $ex_name)) {
             continue;
         }
         $folderlist_new[] = $val;
     }
     $list['filelist'] = $filelist_new;
     $list['folderlist'] = $folderlist_new;
     //读写权限判断
     $list['path_type'] = 'readable';
     if (is_writable($dir)) {
         $list['path_type'] = 'writeable';
     } else {
         if (!is_readable($dir)) {
             $list['path_type'] = 'not_readable';
         }
     }
     _DIR_OUT($list);
     return $list;
 }
开发者ID:zxc135781,项目名称:daocloud-KODExplorer,代码行数:43,代码来源:explorer.class.php

示例7: init_app

 /**
  * 用户app初始化
  */
 public function init_app($user)
 {
     $sql = new fileCache($this->config['system_file']['apps']);
     $list = $sql->get();
     $default = array('365日历', 'pptv直播', 'ps', 'qq音乐', '搜狐影视', '时钟', '水果忍者', '计算器', '豆瓣电台', '音悦台');
     $info = array();
     foreach ($default as $key) {
         $info[$key] = $list[$key];
     }
     $desktop = USER_PATH . $user['name'] . '/home/desktop/';
     foreach ($info as $key => $data) {
         //touch($path);
         $path = iconv_system($desktop . $key . '.oexe');
         unset($data['name']);
         unset($data['desc']);
         unset($data['group']);
         file_put_contents($path, json_encode($data));
     }
     $user['status'] = 1;
     $member = new fileCache($this->config['system_file']['member']);
     $member->update($user['name'], $user);
 }
开发者ID:keycoolkui,项目名称:KODExplorer,代码行数:25,代码来源:user.class.php

示例8: upload_chunk

function upload_chunk($fileInput, $path = './', $temp_path)
{
    global $config, $L;
    $file = $_FILES[$fileInput];
    $chunk = isset($_REQUEST["chunk"]) ? intval($_REQUEST["chunk"]) : 0;
    $chunks = isset($_REQUEST["chunks"]) ? intval($_REQUEST["chunks"]) : 1;
    if (!isset($file)) {
        show_json($L['upload_error_null'], false);
    }
    $file_name = iconv_system($file['name']);
    if ($chunks > 1) {
        //并发上传,不一定有前后顺序
        $temp_file_pre = $temp_path . md5($temp_path . $file_name) . '.part';
        if (get_filesize($file['tmp_name']) == 0) {
            show_json($L['upload_success'], false, 'chunk_' . $chunk . ' error!');
        }
        if (move_uploaded_file($file['tmp_name'], $temp_file_pre . $chunk)) {
            $done = true;
            for ($index = 0; $index < $chunks; $index++) {
                if (!file_exists($temp_file_pre . $index)) {
                    $done = false;
                    break;
                }
            }
            if (!$done) {
                show_json($L['upload_success'], true, 'chunk_' . $chunk . ' success!');
            }
            $save_path = $path . $file_name;
            $out = fopen($save_path, "wb");
            if ($done && flock($out, LOCK_EX)) {
                for ($index = 0; $index < $chunks; $index++) {
                    if (!($in = fopen($temp_file_pre . $index, "rb"))) {
                        break;
                    }
                    while ($buff = fread($in, 4096)) {
                        fwrite($out, $buff);
                    }
                    fclose($in);
                    unlink($temp_file_pre . $index);
                }
                flock($out, LOCK_UN);
                fclose($out);
            }
            show_json($L['upload_success'], true, iconv_app($save_path));
        } else {
            show_json($L['move_error'], false);
        }
    }
    //正常上传
    $save_path = get_filename_auto($path . $file_name);
    //自动重命名
    if (move_uploaded_file($file['tmp_name'], $save_path)) {
        show_json($L['upload_success'], true, iconv_app($save_path));
    } else {
        show_json($L['move_error'], false);
    }
}
开发者ID:WPG,项目名称:KODExplorer,代码行数:57,代码来源:file.function.php

示例9: path

 private function path($dir, $list_file = true, $check_children = false)
 {
     $list = path_list($dir, $list_file, $check_children);
     $file_parem = array('filelist' => array(), 'folderlist' => array());
     $path_hidden = $this->config['setting_system']['path_hidden'];
     $ex_name = explode(',', $path_hidden);
     foreach ($list['filelist'] as $key => $val) {
         if (in_array($val['name'], $ex_name)) {
             continue;
         }
         if ($val['ext'] == 'oexe') {
             $path = iconv_system($val['path']) . '/' . iconv_system($val['name']);
             $json = json_decode(file_get_contents($path), true);
             if (is_array($json)) {
                 $val = array_merge($val, $json);
             }
         }
         $file_parem['filelist'][] = $val;
     }
     foreach ($list['folderlist'] as $key => $val) {
         if (in_array($val['name'], $ex_name)) {
             continue;
         }
         $file_parem['folderlist'][] = $val;
     }
     _DIR_OUT($file_parem);
     return $file_parem;
 }
开发者ID:zhendeguoke1008,项目名称:OneShop,代码行数:28,代码来源:share.class.php

示例10: upload

/**
 * 文件上传处理。单个文件上传,多个分多次请求
 * 调用demo
 * upload('file','D:/www/');
 */
function upload($fileInput, $path = './')
{
    global $config, $L;
    $file = $_FILES[$fileInput];
    if (!isset($file)) {
        show_json($L['upload_error_null'], false);
    }
    $file_name = iconv_system($file['name']);
    $info = _upload($file['tmp_name'], $file['size'], $path . $file_name);
    show_json($info['data'], $info['code'], $info['path']);
}
开发者ID:keycoolkui,项目名称:KODExplorer,代码行数:16,代码来源:file.function.php

示例11: path

 private function path($dir, $list_file = true, $check_children = false)
 {
     $list = path_list($dir, $list_file, $check_children);
     foreach ($list['filelist'] as $key => $val) {
         if ($val['ext'] == 'oexe') {
             $path = iconv_system($val['path']) . '/' . iconv_system($val['name']);
             $json = json_decode(file_get_contents($path), true);
             if (is_array($json)) {
                 $list['filelist'][$key] = array_merge($val, $json);
             }
         }
     }
     _DIR_OUT($list);
     return $list;
 }
开发者ID:longmore,项目名称:KODExplorer,代码行数:15,代码来源:explorer.class.php

示例12: init_app

 /**
  * 用户app初始化
  */
 public function init_app($user)
 {
     $sql = new fileCache($this->config['system_file']['apps']);
     $list = $sql->get();
     $desktop = USER_PATH . $user . '/home/desktop/';
     foreach ($list as $key => $data) {
         //touch($path);
         $path = iconv_system($desktop . $key . '.oexe');
         unset($data['name']);
         unset($data['desc']);
         unset($data['group']);
         file_put_contents($path, json_encode($data));
     }
 }
开发者ID:longmore,项目名称:KODExplorer,代码行数:17,代码来源:app.class.php


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