For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > July 2006 > File manager









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author File manager
news.telia.net

2006-06-17, 8:04 am

Hi!

I wonder if anyone knows if there is a software or script that can take a
folder with a lots of subfolders in it and make html-pages of it. I have a
lot of free softwares organized in a lot of folders and would like to put
them on a webserver and in the same categories as I have them in the
folders.

Thanks
Cassandra


mark babli

2006-07-12, 6:57 pm

<?

print("<table cellpadding='5' width='400' height='20'
bgcolor='white'>");
$userdir =("/PATH/TO/YOUR/FOLDERS"); //needs to be modified
$web_dir = http://DOMAIN NAME/; // needs to be modified

$stream = @ opendir($userdir) or die("Could Not Open User
Dir........");

while($folder = readdir($stream))
{
if (is_file("$userdir/$folder") || $folder =="." || $folder=="..")
continue;
//future enhancements where u could play with the extensions for
whatever reason
$extension= substr($folder, strpos($folder, '.'));
print "<tr>";

print
"<td><a href=$web_dir$UserName/$folder/
target='_blank'>$folder</a><br>";
print "</td></tr>";
}
}
print("</table>");
?>

I hope this works, this is how i read my user files and put them out.

"news.telia.net" <cassandra33@telia.com> wrote in message
news:ieUig.4488$E02.1459@newsb.telia.net...
> Hi!
>
> I wonder if anyone knows if there is a software or script that can take a
> folder with a lots of subfolders in it and make html-pages of it. I have a
> lot of free softwares organized in a lot of folders and would like to put
> them on a webserver and in the same categories as I have them in the
> folders.
>
> Thanks
> Cassandra
>
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com