Re: Hide Files
| From: | CC Zona | Date: | Mon, 19 Feb 2001 22:38:10 +0000 |
| Subject: | Re: Hide Files | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-6763@lists.php.net to get a copy of this message | ||
In article <000c01c09ac2$7ed27ab0$0100a8c0@fusion>, Fusion@crown.net
("Fusion") 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?
Are you trying to use '*' as a wildcard character? Because right now, it's
only looking to exclude a file with the exact, literal name '*.php'--not
files like 'anything.php'. Check out the regular expression functions,
either the ereg_* family or preg_*, to do pattern matching.
--
CC