[PHP-DEV] PHP 4.0 Bug #7344: opendir always returns a resource even on non-existen directories From: jalal <email protected>
Date: 10/19/00

From: jalal <email protected>
Operating system: WinNT4sp6
PHP version: 4.0 Latest CVS (19/10/2000)
PHP Bug Type: Directory function related
Bug description: opendir always returns a resource even on non-existen directories

See subject line...
Try code:

$dir = "/somewhere/on/my/drive";
$res = opendir( $dir );
echo "\$dir=$dir, \$res = $res\n";

returns:
$dir=/somewhere/on/my/drive, $res = Resource ID #1

(/somewhere/on/my/drive is not a real directory.

On linux, the same code returns a false;

-- 
Edit Bug report at: http://bugs.php.net/?id=7344&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>