On 5/21/06, Alain Roger <[EMAIL PROTECTED]> wrote:
i have 1 folder, in this folder sometime a file can be sometimes not...

1. i would like to detect if the folder contains a file or not.
only 1 file can be in this folder but i do not know the name of this file,
and the extension should be xls.

Use the glob function: php.net/glob. Something like:

$f = glob('*.xls');
if ( count($f) )
$file = $f[0];
else
 die('no file');

Rabin

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

Reply via email to