本文整理汇总了PHP中uploader::createResource方法的典型用法代码示例。如果您正苦于以下问题:PHP uploader::createResource方法的具体用法?PHP uploader::createResource怎么用?PHP uploader::createResource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类uploader
的用法示例。
在下文中一共展示了uploader::createResource方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explode
}
if (!empty($draft['categories'])) {
$c = explode(',', $draft['categories']);
$cats = array();
foreach ($c as $v) {
$p = explode('|', $v);
$cats[] = array('category_id' => $p[0], 'subcategory_id' => $p[1]);
}
if ($cats) {
$tmpPrj->setCategories($cats);
}
}
}
}
if (!$uploader) {
$uploader = new uploader(uploader::createResource('project'));
}
if (!$_POST['IDResource'] && $draft_id) {
$attachedfiles_tmpdraft_files = drafts::getAttachedFiles($draft_id, 4);
if ($attachedfiles_tmpdraft_files) {
$attachedfiles_draft_files = array();
foreach ($attachedfiles_tmpdraft_files as $attachedfiles_draft_file) {
$attachedfiles_draft_files[] = $attachedfiles_draft_file;
}
$uploader->setFiles($attachedfiles_draft_files, uploader::STATUS_ADDED);
}
} else {
$attachedfiles_tmpprj_files = $tmpPrj->getAttach();
if ($attachedfiles_tmpprj_files) {
$attachedfiles_prj_files = array();
foreach ($attachedfiles_tmpprj_files as $attachedfiles_prj_file) {
示例2: array
$uploader_field_element = array();
if (count($tservice->images)) {
foreach ($tservice->images as $key => $image) {
$uploader_field_element[] = array('hash' => md5($solt . $image['id'] . $tuid . $uid), 'qquuid' => $image['id'], 'src' => WDCPREFIX . '/' . $image['path'] . $image['fname']);
}
}
$sess = __paramInit('string', NULL, 'uploader_sess', NULL);
if ($sess) {
$files = uploader::sgetFiles($sess);
if (count($files)) {
foreach ($files as $file) {
if (strpos($file['fname'], 'tiny_') === FALSE) {
continue;
}
$uploader_field_element[] = array('qquuid' => $file['id'], 'src' => WDCPREFIX . '/' . $file['path'] . $file['fname']);
}
}
} else {
$sess = uploader::createResource('tservices');
}
//------------------------------------------------------------------------------
$city = new city();
if (!$tservice->city) {
$tservice->city = $user_obj->city > 0 ? $user_obj->city : 1;
}
$location_value = $city->getCountryName($tservice->city) . ": " . $city->getCityName($tservice->city);
//------------------------------------------------------------------------------
$user_phone_tservice = user_phone::getInstance()->render(user_phone::PLACE_TSERVICE);
$is_bg = true;
$inner = 'tpl.form.php';
include "../template3.php";