Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi all, Im trying to get my script to let users change and upload into sub-DIR's and also for the script to add the size of the files in the sub DIR's to the file in the root DIR and i would to print the list like this
A_dir
B_dir
A_file
B_file
===============================================
This is the code im using now
I have setup a temp accout so that you can see what it dose now and maby it will help you see what i mean. CLICK HERE just use this to log-ig
username-temp
password-temp
Thank You
A_dir
B_dir
A_file
B_file
===============================================
This is the code im using now
@dir = sort {lc($a) cmp lc($b)} @dir; foreach $line (@dir) { if (-f "$config{'root_dir'}/$in{'username'}/$line") { @stat=stat("$config{'root_dir'}/$in{'username'}/$line"); if ($stat[7] > 1000) { $stat[7] *= .001; $stat[7] = int($s +tat[7]); $stat[7] .= " KB"; } else { $stat[7] = int($stat[7]); $stat[7] .= " Bytes"; } $stat[9] = localtime($stat[9]); $list .= qq~ <tr> <td width="30"><input type="radio" value="$line" name="file" onclick=" +document.files.file_input.value='$line'"></td> <td width="250"><font face="Arial"><a href="$config{'root_url'}/$in{'u +sername'}/$line" target="_window">$line</a></font></td> <td width="100"><font face="Arial">$stat[7]</font></td> <td><font face="Arial">$stat[9]</font></td> </tr>~;
I have setup a temp accout so that you can see what it dose now and maby it will help you see what i mean. CLICK HERE just use this to log-ig
username-temp
password-temp
Thank You
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: how can i also show sub folders
by tstock (Curate) on Nov 21, 2001 at 13:21 UTC | |
Re: how can i also show sub folders
by Zaxo (Archbishop) on Nov 21, 2001 at 13:14 UTC | |
by jclovs (Sexton) on Nov 21, 2001 at 14:04 UTC | |
by Anonymous Monk on Nov 21, 2001 at 18:47 UTC |
Back to
Seekers of Perl Wisdom