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


PHP uploader::createResource方法代码示例

本文整理汇总了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) {
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例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";
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:manage.php


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