rapmaster
New Member
ok, here's the problem. I'm attempting to do a directory list. I want to list all the contents of the file, simple enough, but I want to tell directorys apart from files, but when I write the code it plunks out. Here's wut I'm try'n
when it returns the doesn't print anything, its suppose to print a table listing files and directories to be edited/deleted/etc.
Any Ideas? I can provide more of the code if need be.
Code:
$userdir = opendir($user_dir);
$userfile = readdir($userdir);
$filesize = filesize($userfile);
while($userfile = readdir($userdir)) {
if($userfile != ".." && $userfile != "."){
if(is_file($userfile)) {
...run some little routine for my script
}
elseif(is_dir($userfile)){
...run routine to tell its a directory
}
}
when it returns the doesn't print anything, its suppose to print a table listing files and directories to be edited/deleted/etc.
Any Ideas? I can provide more of the code if need be.