Bug #925 Updated: is_file and is_dir dont seem to work.
| From: | Bug Database | Date: | Wed, 18 Nov 1998 12:08:15 +0000 |
| Subject: | Bug #925 Updated: is_file and is_dir dont seem to work. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-2460@lists.php.net to get a copy of this message | ||
ID: 925
User Update by: mne@ptv.dk
Status: Open
Bug Type: Misbehaving function
Description: is_file and is_dir dont seem to work.
PHP is very easy to use and it works - thanks!
However I have a problem with is_file and is_dir:
I am using PHP on WinNT 4 and IIS 3, and is_file and is_dir dont return correct info.
is_file returns FALSE even though there are files, and is_dir only returns TRUE when
reading current and parent directory (. and ..).
----------------------
From phpinfo():
PHP Version 3.0.5: System: Windows NT 4.0 build 1381 Build Date: Oct 5 1998
----------------------
Here's the script I'm using - it outputs all files AND directories (though excluding . and
..),
even though I would expect it to only print files (I'm using !is_dir because is_file returns
nothing
at all):
<script language="php">
$directory = "f:/inetpub/wwwroot/uploads/";
$dir1 = dir($directory);
echo "<HTML><BODY><CENTER><BR><BR>";
while($entry=$dir1->read())
{
if (!is_dir($entry))
{ echo "$entry<BR>\n"; }
}
$dir1->close();
echo "</BODY></HTML>\n";
</script>
Full Bug description available at: http://ca.php.net/bugs.php3?id=925
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net