Jump to content

Get directories


The Little Guy

Recommended Posts

I would like to get it any way possible, the faster the better, and the easier to manage the better.

Basically it will be used for users to look at all the folders they currently own, and delete the ones they don't want. So that means there will be two pages, one for the displaying, and one for the deleting.

I currently have this, but it doesn't work, it only works for certain directories, which I didn't understand, so... yeh...
[code]
<?php
$dir = $_SERVER['DOCUMENT_ROOT'].'/users/'.$_SESSION['user'];
$files = scandir($dir, 1);
foreach($files as $file){
if(is_dir($file) && $file != '.' && $file != '..'){
echo '<strong class="bigger">'.$file.'</strong>';
}
}
?>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/33614-get-directories/#findComment-157569
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.