Re: [PHP] Listing files and their details on a text file

2002-11-18 Thread Andrew Brampton
You would do it just like you would if you were outputing to the browser
look up the following:
dir, fopen and fwrite.

Just be looking at the examples and user comments you will have all the
source you need

Andrew
- Original Message -
From: Carlos Fernando Scheidecker Antunes [EMAIL PROTECTED]
To: PHP-GENERAL [EMAIL PROTECTED]
Sent: Tuesday, November 19, 2002 1:34 AM
Subject: [PHP] Listing files and their details on a text file


 Hello all,

 I need to do something that you might be able to advise me.

 I would like to list all the contents (files) of a directory in a text
file.
 Each line/record must have the file name, date and size. Does anyone know
 how to do it?

 Thank you,

 C.F.Scheidecker Antunes.


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Listing files

2001-12-31 Thread Brian Clark

* Todd Cary ([EMAIL PROTECTED]) [Dec 31. 2001 11:32]:

 I would like to present the surfer with a list of files in a directory
 (I'll probably put then into a drop-down) and then I want to send the
 file to the surfer if one is selected.  I am not sure of the syntax to

 1) List the files in a directory

Using PHP 4.x?

http://www.php.net/manual/en/class.dir.php

 2) Send a selected file to the surfer

http://www.php.net/manual/en/function.header.php

Scroll 3/4 down.

 Many thanks for any help in getting the correct syntax to do this..

HTH

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Avoid strange women and temporary variables.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Listing files from a directory

2001-08-21 Thread Seb Frost

store all the names in an array and then sort that using an inbuilt php
function,  maybe.

- seb

-Original Message-
From: Martin E. Koss [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2001 16:43
To: [EMAIL PROTECTED]
Subject: [PHP] Listing files from a directory


I am trying to find a way to list files alphabetically.

?
// list images in a drop down list
$Dir = ../Prod-Images/Thumbnails;
$mydirectory = opendir($Dir);

while($entryName = readdir($mydirectory)) {
if ($entryName[0] != .  $entryName != .  $entryName != .. 
$entryName != WS_FTP.LOG  $entryName != NA.gif  $entryName !=
NA.jpg) {
PRINT option value=\$entryName\ . $entryName/option\n;
}
}
closedir($mydirectory);
?

I've looked through old messages on the subject but even though on Win32 it
lists in the right way but not on the Apache Webserver.

Thanks.
Martin.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Listing files from a directory

2001-08-21 Thread Thomas Deliduka

On 8/21/2001 11:42 AM this was written:

 I am trying to find a way to list files alphabetically.

Try putting the filenames into an array and sort the array.
-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]