当前位置: 首页>>代码示例>>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;未经允许,请勿转载。