Re: Problems with is_dir()
| From: | Jay | Date: | Thu, 29 Jul 2004 12:19:18 +0000 |
| Subject: | Re: Problems with is_dir() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-192175@lists.php.net to get a copy of this message | ||
Ni Shurong wrote:
you must do it like this: <?php if ($handle = opendir($_SERVER["DOCUMENT_ROOT"]."/img")) { while (false !== ($file = readdir($handle))) {You again! Thanx : ) Please stay in here i might need some more help ; ) Regards, Jif ($file != "." && $file != "..") { + $path = $_SERVER["DOCUMENT_ROOT"]."/img" . "/" . $file; ! if (is_dir($path)){echo "Dir: ".$file; } else { echo "File: ".$file; } echo "<br />";} }closedir($handle); clearstatcache(); } ?> ---- Ni Shurong <srni@gzlinux.org> MAIL : srni@gzlinux.org QQ : 412844 MSN : nsr_xh@hotmail.com BLOG : http://blog.njmars.com/myhan/