Date: 10/10/01
- Next message: Sam: "[PHP] Simple Cookies not working"
- Previous message: Philip Olson: "Re: [PHP] how to convert a string into a date format ?????"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
if (preg_match("/(^(\.{1,2})$)|(head\.jpg)|(^tn_)/im", $file_name))
continue; // skip this file
.
.
.
"McShen" <hshen <email protected>> wrote in message
news:20010715013739.79177.qmail <email protected>
> hi,
>
> I wanna print out all files in a directory. But i wanna exclude ".", "..",
> "head.jpg", and all files that start with tn_
>
> Here is my script, but it didn't work. Please help me to solve this
problem.
> Thank You.
>
> ---------my script-----
> while ($file_name = readdir($dir2))
>
> if (($file_name!="." && $file_name!=".." && $file_name!="head.jpg" &&
> $file_name!=ereg(^tn_,$file_name) ))
>
> $files[]=$file_name;
> }
>
> $numfiles = count($files);
>
> for ($i=$g; $i<$numfiles; $i++){
> echo $files[$i];
> }
>
> -----------------
>
>
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Sam: "[PHP] Simple Cookies not working"
- Previous message: Philip Olson: "Re: [PHP] how to convert a string into a date format ?????"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

