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


PHP jFile::move方法代碼示例

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


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

示例1: checkData


//.........這裏部分代碼省略.........
                 $this->setError(JText::_('COM_JDOWNLOADS_BACKEND_FILESEDIT_INVALID_FILE_SIZE'));
                 return false;
             }
         }
         // check the access handling
         if ($user_rules->form_access == 0) {
             // the access select field was not viewed so we use the default value when exist
             if ($user_rules->uploads_default_access_level) {
                 $this->access = (int) $user_rules->uploads_default_access_level;
                 $default_access_value_used = true;
             }
         } else {
             // the access select field was viewed
             if ($this->access > 1) {
                 // user has selected a special access level so we do not use the access value from parent category
                 $default_access_value_used = true;
             }
         }
     }
     // this part is always used
     if ($this->cat_id > 1) {
         if ($isNew && !$default_access_value_used) {
             // set access level value from parent
             $query = "SELECT * FROM #__jdownloads_categories WHERE id = '{$this->cat_id}'";
             $db->setQuery($query);
             $parent_cat = $db->loadObject();
             $this->access = $parent_cat->access;
         }
     }
     // we need the rest only when the new item is not added by monitoring !!!
     if (!$auto_added) {
         // get the uploaded image files
         $imagefiles = $jFileInput->get('file_upload_thumb', array(), 'array');
         $movedmsg = '';
         $errormsg = '';
         $cat_dir_org = '';
         $filename_org = '';
         $marked_cat_id = '';
         $file_cat_changed = false;
         $invalid_filename = false;
         $thumb_created = false;
         $image_created = false;
         $image_thumb_name = '';
         $filename_renamed = false;
         $filename_new_name = '';
         $filename_old_name = '';
         $use_xml_for_file_info = 0;
         $selected_updatefile = 0;
         // use xml install file to fill the file informations
         if (isset($formdata['use_xml'])) {
             $use_xml_for_file_info = (int) $formdata['use_xml'];
         }
         // marked cat id
         if (isset($formdata['cat_id'])) {
             $marked_cat_id = (int) $formdata['cat_id'];
         } else {
             // is download added about jdownloadsModeldownload::createDownload() ?
             if ($this->cat_id > 0) {
                 $marked_cat_id = (int) $this->cat_id;
             }
         }
         // prior marked cat id
         $cat_dir_org = $jinput->get('cat_dir_org', 0, 'integer');
         // original filename changed?
         $filename_org = $jinput->get('filename_org', '', 'string');
         if (!$isNew && $filename_org != '' && $formdata['url_download'] != '' && $filename_org != $formdata['url_download']) {
開發者ID:ashanrupasinghe,項目名稱:dnp,代碼行數:67,代碼來源:download.php


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