Philou ^_^
|
Posted: 07/24/2003, 2:04 AM |
|
Hi there
I'd like to make a list box with the list every files in a folder.
I'd like to know how to do that with CCS and if there is a way of making it
able to check subfolders too and add the files to the list ?
I'm using php and mysql.
That's one is not easy ^_^;
Bonne journée
ICQ : 44116813
AIM & IRC & YAHOO : Philou255
MSN :philou255@hotmail.com
HL : AnimeParadise.mine.nu
My software never has bugs, it just develops random features.
|
|
|
Philou ^_^
|
Posted: 07/24/2003, 2:10 AM |
|
This is the code I usually use but how it doesn't show the contente of
subfolders... and it's not made for CCS
clearstatcache();
$dir="../the_folder/";
$opendir = @opendir($dir);
while ($readdir = @readdir($opendir)){
if($readdir<>"." && $readdir<>".." && $readdir != "index.html"){
$filearr[] = $readdir;
}
$sort=array();
for($i=1;$i<=count($filearr);$i++){
$key = sizeof($filearr)-$i;
$file = $filearr[$key];
$sort[$i]=$file;
}
asort($sort);
}?>
<select name="FILES">
<option>Choose a file</option>
<?php
for($i=1;$i<=count($sort);$i++){
list($key,$value)=each($sort);
?>
<option value="<?php echo $value; ?>"><?php echo $value;
?></option>
<?php } ?>
</select>
if anyone could help me out with this one that would be nice ^_^
Bonne journée
ICQ : 44116813
AIM & IRC & YAHOO : Philou255
MSN :philou255@hotmail.com
HL : AnimeParadise.mine.nu
My software never has bugs, it just develops random features.
|
|
|
Philou ^_^
|
Posted: 07/24/2003, 6:01 AM |
|
Seems to be a recursive matter of readdir and is_dir() ... or since my
server is running on Unix I could use ls or du...
but I'm still open to anyone who would know of a way ^_^.
I didn't quite master CCS so it's a bit tricky right now for me :-p
Bonne journée
ICQ : 44116813
AIM & IRC & YAHOO : Philou255
MSN :philou255@hotmail.com
HL : AnimeParadise.mine.nu
My software never has bugs, it just develops random features
|
|
|
|