本文整理匯總了PHP中IO::getFolderByIcosdata方法的典型用法代碼示例。如果您正苦於以下問題:PHP IO::getFolderByIcosdata方法的具體用法?PHP IO::getFolderByIcosdata怎麽用?PHP IO::getFolderByIcosdata使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IO
的用法示例。
在下文中一共展示了IO::getFolderByIcosdata方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
//分4種情況:a:本地到api;b:api到api;c:api到本地;d:本地到本地;
foreach ($icoids as $icoid) {
//在目標位置創建
$opath = rawurldecode($icoid);
$path = rawurldecode(str_replace(array('_dock_', 'icosContainer_folder_', 'icosContainer_body_'), '', $container));
$return = IO::CopyTo($opath, $path, $iscopy);
if (!$iscopy) {
$return = IO::DeleteByData($return);
}
if ($return['success'] === true) {
$data['icoarr'][] = $return['newdata'];
if (!$tbz) {
addtoconfig($return['newdata'], $ticoid);
}
if ($return['newdata']['type'] == 'folder') {
$data['folderarr'][] = IO::getFolderByIcosdata($return['newdata']);
}
$data['successicos'][$return['icoid']] = $return['newdata']['icoid'];
} else {
$data['error'][] = $return['name'] . ':' . $return['success'];
}
}
if ($data['successicos']) {
$data['msg'] = 'success';
if (isset($data['error'])) {
$data['error'] = implode(';', $data['error']);
}
echo json_encode_gbk($data);
exit;
} else {
$data['error'] = implode(';', $data['error']);
示例2: array
$name = io_dzz::name_filter(trim($_GET['name']));
if ($icoarr['name'] != $name || $icoarr['type'] == 'folder' && $icoarr['gid'] > 0) {
C::t('icos')->update_by_name($icoid, $name);
if ($icoarr['type'] == 'folder' && $icoarr['gid'] > 0 && (C::t('organization_admin')->ismoderator_by_uid_orgid($icoarr['gid'], $_G['uid']) || $_G['adminid'] == 1)) {
C::t('folder')->update($icoarr['fid'], array('perm' => intval($_GET['perm'])));
}
$return = C::t('icos')->fetch_by_icoid($icoid);
$return['msg'] = 'success';
}
} else {
$name = io_dzz::name_filter(trim($_GET['name']));
if ($icoarr['name'] != $name) {
$return = IO::rename($icoid, $name);
if (empty($return['error'])) {
if ($return['type'] == 'folder') {
$return['folderdata'] = IO::getFolderByIcosdata($return);
}
$return['msg'] = 'success';
$return['oicoid'] = $icoarr['icoid'];
}
}
}
showmessage('do_success', $refer . '', $return, array());
} else {
$info = array();
$info['icon'] = $icoarr['img'] ? $icoarr['img'] : geticonfromext($icoarr['ext'], $icoarr['type']);
$info['name'] = getstr($icoarr['name'], 30);
$info['ftype'] = $icoarr['ftype'];
//獲取路徑
if ($icoarr['bz']) {
$bzarr = explode(':', $icoarr['path']);
示例3: exit
$order = $marker;
$limit = $perpage;
}
$icosdata = IO::listFiles($path, $by, $order, $limit, $force);
if ($icosdata['error']) {
exit(json_encode($icosdata));
}
$folderdata = array();
$ignore = 0;
foreach ($icosdata as $key => $value) {
if ($value['error']) {
$ignore++;
continue;
}
if ($value['type'] == 'folder') {
$folder = IO::getFolderByIcosdata($value);
$folderdata[$folder['fid']] = $folder;
}
if (strpos($bz, 'ftp') === false) {
if (trim($value['path'], '/') == trim($path, '/')) {
$ignore++;
continue;
}
}
$userdata[$value['uid']] = $value['username'];
$data[$key] = $value;
}
//$sid=md5(rawurldecode($sid));
//$data=$icosdata;
$bz = $bz;
//print_r($data); exit($sid);