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


PHP Folder::getPath方法代码示例

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


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

示例1: moveTo

 /**
  * @param   Folder $folder The Folder into which it should be moved
  *
  * @return  Folder The domain object for further usage
  *
  * @author  Nicolas Pecher
  * @version Version 0.1, 01.05.2012
  */
 public function moveTo(Folder $folder)
 {
     $newFolder = new Folder();
     $newFolder->create($folder->getPath() . '/' . $this->getName());
     $children = $this->getContent();
     foreach ($children as $child) {
         $child->moveTo($newFolder);
     }
     $this->delete();
     $this->basePath = $folder->getPath();
     return $this;
 }
开发者ID:GeneralCrime,项目名称:code,代码行数:20,代码来源:Folder.php

示例2: printFolderOptions

 /** Print folder options in select box */
 function printFolderOptions($id = 0)
 {
     global $dbi;
     if ($id == 0) {
         echo "<option value=\"0\">/</option>";
     }
     // Get subsections
     $result = $dbi->query("SELECT id FROM " . folderTableName . " WHERE parentId=" . $dbi->quote($id) . " ORDER BY name");
     if ($result->rows()) {
         for ($i = 0; list($id) = $result->fetchrow_array(); $i++) {
             $folder = new Folder($id);
             echo "<option value=\"" . $folder->id . "\"" . ($this->id == $folder->id ? " selected=\"selected\"" : "") . ">";
             echo $folder->getPath() . "/</option>";
             $this->printFolderOptions($folder->id);
         }
     }
 }
开发者ID:gkathir15,项目名称:catmis,代码行数:18,代码来源:Folder.class.php

示例3: doUploadFile

 /**
  * Dateiupload-Vorgang ausführen
  */
 function doUploadFile()
 {
     //Relative Pfadangabe für Upload-Verzeichniss ermitteln
     $f = dirname($_SERVER['SCRIPT_NAME']);
     if (strlen(str_ireplace("/", "", $f)) == 0) {
         $f = "";
     } else {
         //wenn vorhanden ersten slash abschneiden
         if (substr($f, 0, 1) == "/" && strlen($f) > 0) {
             $f = substr($f, 1);
         }
         //wenn nicht vorhanden letzten slash anhängen
         if (substr($f, strlen($f) - 1 && strlen($f) > 0) != "/") {
             $f = $f . "/";
         }
     }
     //Verzeichniss erzeugen
     $folder = new Folder($_SERVER['DOCUMENT_ROOT'] . $this->getTargetPath());
     $newFileName = $folder->doUploadFile($_FILES['probe'], substr($folder->getPath(), strlen($_SERVER['DOCUMENT_ROOT'])), $this->getFilePrefix(), $this->TARGETFILENAME);
     $t = new Text("Datei " . $_FILES['probe']['name'] . " wurde hochgeladen.\n\n");
     $t->show();
     $this->insertIntoDbIfNeeded(substr($newFileName, strlen($_SERVER['DOCUMENT_ROOT'])));
     $this->doPostUpload();
 }
开发者ID:CyborgOne,项目名称:cybihomecontrol_ui,代码行数:27,代码来源:ImageUploader.php


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