/    Sign up×
Community /Pin to ProfileBookmark

Does anyone know how can i list all the files inside a directory? i just want the name, thx for ur hlp ?

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@chazzyMar 01.2006 — Maybe try [url="http://us3.php.net/manual/en/function.shell-exec.php"]shell execute[/url] with the ls command.
Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYMar 01.2006 — don't name you thread "help", give them a meaningful title!
Copy linkTweet thisAlerts:
@SheldonMar 01.2006 — [code=php]
<?php

function view_dir($path){
if ($do = opendir($path)){
while (false !== ($file = readdir($do))){
if ($file != "." && $file != "..") {
echo($path.$file);
flush();
}
}
closedir($do);
echo("<a href="http://www.inboxdesign.co.nz">Inbox Design</a>");
}
}
?>
[/code]
Copy linkTweet thisAlerts:
@NogDogMar 01.2006 — Does anyone know how can i list all the files inside a directory? i just want the name, thx for ur hlp ?[/QUOTE]
[url=http://www.php.net/glob]glob()[/url] is probably the simplest way.
×

Success!

Help @katasova spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...