| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#1 (permalink) |
|
Registered User
Seasoned Poster
Joined in Sep 2004
43 posts
Gave thanks: 0
Thanked 0 times
|
PHP Director Lister
Hi all, I need a directory lister for my site... it would be best if the lister can actually connect to the FTP!
I have a code but it doesnt suit me much because it doesnt show me FILE SIZE and TIME STAMP Here's the code: PHP Code:
__________________
Last edited by Dima; September 14th, 2004 at 6:20 AM. |
|
|
|
|
|
#2 (permalink) |
|
minor deity
Super #1
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,338 posts
Gave thanks: 23
Thanked 93 times
|
The script you have is pulling ftp_rawlist, so it should have what you want in there. Have a look at the PHP.NET page for the FTP functions:
http://us4.php.net/manual/en/function.ftp-rawlist.php
__________________
Proud to be a Surmunity Mod! XEON Make a fundamental difference! My Sites: Curious about Brewing Beer? Join the community! >>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax Get into an Art museum Victorian London It's your brain -ON WEB - mybrainhost.com (under development) What SHOULD Government do? Much Less than it Does! |
|
|
|
|
|
#5 (permalink) |
|
Surpass Fan
Seasoned Poster
Joined in Aug 2004
Lives in North Carolina, USA
Hosted on Pass11
46 posts
Gave thanks: 0
Thanked 0 times
|
I've made a dirlist script that simply reads from the directory the script sits in(easily modified to view any directory). I've never messed with the FTP functions.
I think i used scandir (or equivelent) function to just pull a directory listing into an array, and stepped through the array, checking each "filename" to see if it was a directory or filename, and was able to easily access the modified time and filesize with the set of filesystem functions. If you can't get the info you need from the FTP listings, try resolving a path to whatever file/subdir you're looping on and use the PHP filesystem functions instead. (filesize, filemtime) http://www.php.net/filesystem
__________________
All your base are belong to us. |
|
|
|