listDir.php

来源:互联网 发布:店铺淘宝客效果 编辑:程序博客网 时间:2024/06/05 09:55

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> listDir.php </title>
  <meta charset="UTF-8">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
 </head>


 <body>
<?php
/*
 *@blog  http://www.phpddt.com
 */
function listDir($dir = '.'){
if ($handle = opendir($dir)) {
echo 'begin of ' . $dir . '<br>';
while (false !== ($file = readdir($handle))) {
if($file == '.' || $file == '..'){
continue;
}
if(is_dir($sub_dir = realpath($dir.'/'.$file))){
echo 'FILE in PATH:'.$dir.':'.$file.'<br>';
listDir($sub_dir);
}else{
echo 'FILE:'.$file.'<br>';
}
}
closedir($handle);
echo 'end of ' . $dir . '<hr>';
}
}
 
listDir('D:\web\workspace\hellophp');
?>
 </body>
</html>


begin of D:\web\workspace\hellophp
FILE:.project
FILE in PATH:D:\web\workspace\hellophp:.settings
begin of D:\web\workspace\hellophp\.settings
FILE:org.eclipse.wst.common.project.facet.core.xml
FILE:org.eclipse.php.core.prefs
end of D:\web\workspace\hellophp\.settings


FILE:.buildpath
FILE:hello.php
FILE:hello.php.bak
FILE:Red Hat 9-2014-12-04-21-16-17.png
FILE:Red Hat 9-2014-12-04-21-26-22.png
FILE:testXdebug3.php
FILE:action.php
FILE:action.php.bak
FILE:printr.php
FILE:printr.php.bak
FILE:PHPInject.php
FILE:PHPInject.php.bak
FILE:foreach_test.php
FILE:foreach_test.php.bak
FILE:PHPif.php
FILE:PHPif.php.bak
FILE:script_php.php
FILE:script_php.php.bak
FILE:asp_style.php
FILE:inc.php
FILE:inc_test.php
FILE:inc.php.bak
FILE:testvars.php
FILE:vars.php
FILE:testvars.php.bak
FILE:comment.php
FILE:comment.php.bak
FILE:var_type.php
FILE:var_type.php.bak
FILE:typeconvert.php
FILE:typeconvert.php.bak
FILE:typeconvert2.php
FILE:typeconvert2.php.bak
FILE:boolean.php
FILE:boolean.php.bak
FILE:integer.php
FILE:integer.php.bak
FILE:printf.php
FILE:PHP_integer.php
FILE:PHP_integer.php.bak
FILE:intval.php
FILE:intval.php.bak
FILE:float.php
FILE:float.php.bak
FILE:float_compare.php
FILE:float_compare.php.bak
FILE:str2num.php
FILE:str2num.php.bak
FILE:is_nan.php
FILE:string_type.php
FILE:string_type.php.bak
FILE:Heredoc.php
FILE:Heredoc.php.bak
FILE:Heredoc2.php
FILE:Heredoc3.php
FILE:Heredoc3.php.bak
FILE:Heredoc4.php
FILE:Heredoc4.php.bak
FILE:Nowdoc.php
FILE:Nowdoc.php.bak
FILE:foo.php
FILE:heredoc0.php
FILE:str_expand.php
FILE:str_array.php
FILE:str_array.php.bak
FILE:str_expand.php.bak
FILE:user_agent.php
FILE:user_agent.php.bak
FILE:MySQL_Object.php
FILE:MySQL_PDO.php
FILE:MySQL_PDO.php.bak
FILE:pretend404.php
FILE:http_response_code.php
FILE:http_response_code.php.bak
FILE:pretend404.php.bak
FILE:mail.php
FILE:mail.php.bak
FILE:curlURL.php
FILE:curlURL.php.bak
FILE:curlURL2.php
FILE in PATH:D:\web\workspace\hellophp:httpGet
begin of D:\web\workspace\hellophp\httpGet
FILE:HttpGet.java.bak
FILE:HttpGetTest.java
FILE:HttpGetTest.class
FILE:HttpGetTest2.java
FILE:HttpGetTest2.class
FILE:classpathBak.txt
FILE:httpcomponents-core-4.4.4-bin.zip
FILE:httpcomponents-client-4.5.2-bin.zip
FILE:httpClient_httpGet.rar
end of D:\web\workspace\hellophp\httpGet
FILE:voteThread.php
FILE:compare.php
FILE:class_compare.php
FILE:class_compare.php.bak
FILE:bitOr.php
FILE:bitOr.php.bak
FILE:PATHINFO_EXTENSION.php
FILE:PATHINFO_EXTENSION.php.bak
FILE:Noname1.html
FILE:preg_replace.php
FILE:preg_replace.php.bak
FILE:relativePath.php
FILE:relativePath.php.bak
FILE:listDir.php
FILE:listDir.php.bak
end of D:\web\workspace\hellophp



0 0