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


PHP printFiles函數代碼示例

本文整理匯總了PHP中printFiles函數的典型用法代碼示例。如果您正苦於以下問題:PHP printFiles函數的具體用法?PHP printFiles怎麽用?PHP printFiles使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


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

示例1: printFiles

function printFiles($parentPath)
{
    $directory = array_diff(scandir($parentPath), array('..', '.'));
    $leftNode[] = NULL;
    global $dirList;
    echo "<div class='textBackground'>";
    echo "<form action='download.php' method='post' class='form'>";
    $hasFiles = 0;
    foreach ($directory as $child) {
        if (!is_dir($parentPath . $child)) {
            if (auth('file', $_SESSION['user'], $parentPath . $child)) {
                if (!$hasFiles) {
                    echo "<p class='pheader'>" . basename($parentPath) . "</p>";
                }
                echo "<p class='pitems'>" . $child . "<input type='radio' name='file' value='" . hash('sha256', $parentPath . $child) . "'>" . "</p>";
                $hasFiles = 1;
            }
        } else {
            array_push($leftNode, $child);
        }
    }
    if ($hasFiles) {
        echo "<input type='submit' value='Download''>";
    }
    echo "</form>";
    echo "</div>";
    foreach ($leftNode as $dir) {
        if ($dir != NULL) {
            array_push($dirList, $parentPath . $dir . '/');
            printFiles($parentPath . $dir . '/');
        }
    }
}
開發者ID:KCCCDC,項目名稱:cdc-document-manager,代碼行數:33,代碼來源:files.php

示例2: printFiles

function printFiles($dir)
{
    $list = glob($dir . "/*");
    for ($i = 0; $i < count($list); $i++) {
        if (is_dir($list[$i])) {
            printFiles($list[$i]);
        } else {
            echo $list[$i] . "<br/>";
        }
    }
}
開發者ID:echmaster,項目名稱:data,代碼行數:11,代碼來源:2-9+Функции+для+работы+с+каталогами.php

示例3: setCurrentFile

      * Sets default skin.
      */
 /**
  * Sets default skin.
  */
 case 'setSkin':
     setCurrentFile($sModule, $sSkin, "skins");
     break;
     /**
      * gets languages
      */
 /**
  * gets languages
  */
 case 'getLanguages':
     $sContents = printFiles($sModule, "langs", false, true);
     break;
     /**
      * Sets default language.
      */
 /**
  * Sets default language.
  */
 case 'setLanguage':
     setCurrentFile($sModule, $sLanguage, "langs");
     break;
     /**
      * Get chat's config.
      */
 /**
  * Get chat's config.
開發者ID:BackupTheBerlios,項目名稱:dolphin-dwbn-svn,代碼行數:31,代碼來源:actions.inc.php

示例4: setCurrentFile

      * Sets default skin.
      */
 /**
  * Sets default skin.
  */
 case 'setSkin':
     setCurrentFile($sModule, $sSkin, "skins");
     break;
     /**
      * gets languages
      */
 /**
  * gets languages
  */
 case 'getLanguages':
     $sContents = printFiles($sModule, "langs");
     break;
     /**
      * Sets default language.
      */
 /**
  * Sets default language.
  */
 case 'setLanguage':
     setCurrentFile($sModule, $sLanguage, "langs");
     break;
     /**
      * Get mp3 config
      */
 /**
  * Get mp3 config
開發者ID:BackupTheBerlios,項目名稱:dolphin-dwbn-svn,代碼行數:31,代碼來源:actions.inc.php

示例5: printFiles

 function printFiles($files, $level, $fid)
 {
     foreach ($files as $folder => $file) {
         echo "<div class=\"{$fid} {$cf}";
         if ($fid) {
             echo ' hidden';
         }
         echo "\">";
         if (!is_numeric($folder)) {
             $nfid = md5($folder . $level);
             echo "<div class=\"row\" onclick=\"cdir('{$nfid}')\">";
             echo str_repeat('&nbsp;&nbsp;&nbsp;', $level);
             echo "<img src=\"images/ext/folder.png\" class=\"icon\"> {$folder}</div>";
             printFiles($file, $level + 1, $nfid);
         } else {
             $ext = explode('.', $file[0]);
             $ext = $ext[count($ext) - 1];
             echo "<div class=\"row\">";
             echo str_repeat('&nbsp;&nbsp;&nbsp;', $level);
             echo "<img src=\"images/ext/file_extension_{$ext}.png\" class=\"icon\"> {$file[0]} - {$file[1]}</div>";
         }
         echo "</div>";
     }
 }
開發者ID:algoprog,項目名稱:rivr-search,代碼行數:24,代碼來源:torrent.php

示例6: printPathAsLinks

	text-decoration: none;
	color: #ff0000;
}

a:visited {
	text-decoration: none;
	color: #000066;
}

	</style>
<div style="width: 400px;">
Listing:
<?php 
printPathAsLinks($path);
printDirectories($dirs, $path);
printFiles($files, $path);
?>
<hr>

<form action=login.php method=post target=_top>
<?php 
if ($requireLogin) {
    ?>
	<input type=hidden name=email value="<?php 
    print $user['email'];
    ?>
"><br>
<?php 
}
?>
Switch language:<br>
開發者ID:marczych,項目名稱:hack-hhvm-docs,代碼行數:31,代碼來源:cvslist.php


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