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


PHP Files::createFolder方法代码示例

本文整理汇总了PHP中Files::createFolder方法的典型用法代码示例。如果您正苦于以下问题:PHP Files::createFolder方法的具体用法?PHP Files::createFolder怎么用?PHP Files::createFolder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Files的用法示例。


在下文中一共展示了Files::createFolder方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processNewDir

 /**
  * Create new directories.
  * If in safe_mode, nothing happens.
  * @return boolean true if created, false otherwise.
  */
 function processNewDir()
 {
     if ($this->config['safe_mode'] == true) {
         return false;
     }
     if (isset($_GET['newDir']) && isset($_GET['dir'])) {
         $newDir = rawurldecode($_GET['newDir']);
         $dir = rawurldecode($_GET['dir']);
         $path = Files::makePath($this->getImagesDir(), $dir);
         $fullpath = Files::makePath($path, Files::escape($newDir));
         if (is_dir($fullpath)) {
             return false;
         }
         return Files::createFolder($fullpath);
     }
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:21,代码来源:ImageManager.php

示例2: processNewDir

 /**
  * Create new directories.
  * If in safe_mode, nothing happens.
  * @return boolean true if created, false otherwise.
  */
 function processNewDir()
 {
     if ($this->config['safe_mode']) {
         return false;
     }
     if (isset($_GET['newDir']) && isset($_GET['dir'])) {
         $newDir = rawurldecode($_GET['newDir']);
         $dir = rawurldecode($_GET['dir']);
         $path = Files::makePath($this->getBaseDir(), $dir);
         $fullpath = Files::makePath($path, Files::escape($newDir));
         if (is_dir($fullpath)) {
             return false;
         } else {
             //adding to the DB
             // now the create_unexisting_directory will create the folder
             //$result = Files::createFolder($fullpath);
             global $_course;
             if (isset($_course) && !empty($_course) && isset($_course['code'])) {
                 //@todo make this str to functions
                 $base_dir = substr($path, 0, strpos($path, '/document/') + 9);
                 //
                 $new_dir = substr($fullpath, strlen($base_dir), -1);
                 //
                 create_unexisting_directory($_course, api_get_user_id(), api_get_session_id(), 0, 0, $base_dir, $new_dir, $newDir);
                 $doc_id = DocumentManager::get_document_id($_course, $new_dir);
                 api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', api_get_user_id(), null, null, null, null, api_get_session_id());
             } else {
                 return Files::createFolder($fullpath);
             }
             return true;
         }
     }
 }
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:38,代码来源:ImageManager.php

示例3: executeAddFolder

 /**
  * 
  * @return boolean
  */
 public function executeAddFolder()
 {
     if (Files::createFolder($_REQUEST["path"] . "/" . $_REQUEST["filename"])) {
         Log::getInstance()->insert(array("action" => "upload", "module" => "projects", "title" => "Envoi de fichier(s)", "message" => "Un dossier a été crée pour le projet #" . $_REQUEST["pid"]));
         echo $this->viewHelper->fetch(PROJECTS_VIEWS . "files.tpl", array("files" => Files::getFileContent($_REQUEST["path"] . "/"), "folder" => $_REQUEST["path"]));
     } else {
         echo json_encode(array("alert" => "Une erreur est survenue pendant la création du dossier"));
     }
 }
开发者ID:valkiki,项目名称:karotte,代码行数:13,代码来源:controller.php

示例4: processNewDir

 /**
  * Create new directories.
  * If in safe_mode, nothing happens.
  * @return boolean true if created, false otherwise.
  */
 function processNewDir()
 {
     if ($this->config['safe_mode'] == true) {
         return false;
     }
     if (isset($_GET['newDir']) && isset($_GET['dir'])) {
         $newDir = rawurldecode($_GET['newDir']);
         $dir = rawurldecode($_GET['dir']);
         $path = Files::makePath($this->getBaseDir(), $dir);
         $fullpath = Files::makePath($path, Files::escape($newDir));
         if (is_dir($fullpath)) {
             return false;
         }
         return Files::createFolder($fullpath, $this->config['modx']['folder_permissions']);
         //modified for MODx
     }
 }
开发者ID:jgrau,项目名称:MODx-CMS,代码行数:22,代码来源:ImageManager.php


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