當前位置: 首頁>>代碼示例>>PHP>>正文


PHP qqFileUploader::handleUploadRadio方法代碼示例

本文整理匯總了PHP中qqFileUploader::handleUploadRadio方法的典型用法代碼示例。如果您正苦於以下問題:PHP qqFileUploader::handleUploadRadio方法的具體用法?PHP qqFileUploader::handleUploadRadio怎麽用?PHP qqFileUploader::handleUploadRadio使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在qqFileUploader的用法示例。


在下文中一共展示了qqFileUploader::handleUploadRadio方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: actionUploadAvartar

 public function actionUploadAvartar()
 {
     $id = Yii::app()->request->getParam('id', 0);
     $type = Yii::app()->request->getParam('type', 'channel');
     if ($type == 'genre') {
         $pathUpload = self::_PATH_ICONS_UPLOAD . "genre" . DS;
     } elseif ($type == 'collection') {
         $pathUpload = self::_PATH_ICONS_UPLOAD . "collection" . DS;
     } elseif ($type == 'playlist') {
         $pathUpload = self::_PATH_ICONS_UPLOAD . "playlist" . DS;
     } elseif ($type == 'album') {
         $pathUpload = self::_PATH_ICONS_UPLOAD . "album" . DS;
     } else {
         $pathUpload = self::_PATH_ICONS_UPLOAD . "channel" . DS;
     }
     Yii::import("ext.EAjaxUpload.qqFileUploader");
     $allowedExtensions = array("png");
     //array("jpg","jpeg","gif","exe","mov" and etc...
     $sizeLimit = 100 * 1024 * 1024;
     // maximum file size in bytes
     $uploader = new qqFileUploader($allowedExtensions, $sizeLimit);
     $result = $uploader->handleUploadRadio($pathUpload, $id);
     if ($result['success']) {
         $result['data'] = self::_URL_ICONS_RADIO . $type . '/' . $result['filename'];
     } else {
         $result['data'] = '';
     }
     echo CJSON::encode($result);
 }
開發者ID:giangnh264,項目名稱:mobileplus,代碼行數:29,代碼來源:DefaultController.php


注:本文中的qqFileUploader::handleUploadRadio方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。