At 04:22 PM 2/19/2001 -0600, you wrote:
>while ($file_name = readdir($dir)) {
>if (($file_name != ".")
>  && ($file_name != "..")
>  && ($file_name !="*.php")
>  && ($file_name !="main.gif")
>how come that still displays all the *.php files?

You cannot use wildcards in this comparison:

$file_name !="*.php"

That literally is looking for a file called "*.php".  Instead, use 
something like:

"php" != substr($filename,strlen($filename)-4,3)

I might be off on my numbers there but something like that should 
do.  Probably best not to use regular expressions due to the extra overhead.


Island Net AMT Solutions Group Inc.          Telephone:          250 383-0096
1412 Quadra                                  Toll Free:        1 800 331-3055
Victoria, B.C.                               Fax:                250 383-6698
V8W 2L1                                      E-Mail:    [EMAIL PROTECTED]
Canada                                       WWW:

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to