FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
php-python-node.js/TraversalDir.php at master · pillars03/php-python-node.js · GitHub
pillars03
/
php-python-node.js
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
php-python-node.js
/
TraversalDir.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (23 loc) · 622 Bytes
Breadcrumbs
php-python-node.js
/
TraversalDir.php
Copy path
File metadata and controls
23 lines (23 loc) · 622 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
//遍历目录下的所有子目录和文件
function
my_scandir
(
$
dir
){
$
files
=
array
();
if
(
is_dir
(
$
dir
)){
if
(
$
handle
=
opendir
(
$
dir
)){
while
((
$
file
=
readdir
(
$
handle
))!==
false
){
if
(
$
file
!=
"
.
"
&&
$
file
!=
"
..
"
){
if
(
is_dir
(
$
dir
.
"
/
"
.
$
file
)){
$
files
[
$
file
]=
my_scandir
(
$
dir
.
"
/
"
.
$
file
);
}
else
{
$
files
[]=
$
dir
.
"
/
"
.
$
file
;
}
}
}
}
closedir
(
$
handle
);
return
$
files
;
}
}
print_r
(
my_scandir
(
'
D:/data
'
));
?>
Back
|
FazBrowse Home
|
New Git URL