From 8dd65bea75e8170899cf7422a0a851463795f65c Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Sat, 18 Aug 2001 14:07:43 +0000 Subject: [PATCH] WS fixes git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@55320 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/dir.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/functions/dir.xml b/functions/dir.xml index 2109f8c4a8..30758deb34 100644 --- a/functions/dir.xml +++ b/functions/dir.xml @@ -1,4 +1,4 @@ - + Directory functions Directories @@ -62,26 +62,26 @@ Description - new dir + object dir string directory A pseudo-object oriented mechanism for reading a directory. The given directory is opened. Two properties - are available once directory has been opened. The handle + are available once the directory has been opened. The handle property can be used with other directory functions such as readdir, rewinddir and closedir. The path property is set to path the directory that was opened. Three methods are available: read, rewind and close. - <function>dir</function> Example + <function>dir</function> example $d = dir("/etc"); echo "Handle: ".$d->handle."<br>\n"; echo "Path: ".$d->path."<br>\n"; -while($entry=$d->read()) { +while ($entry = $d->read()) { echo $entry."<br>\n"; } $d->close(); @@ -159,12 +159,12 @@ $d->close(); - <function>opendir</function> Example + <function>opendir</function> example <?php if ($dir = @opendir("/tmp")) { - while($file = readdir($dir)) { + while ($file = readdir($dir)) { echo "$file\n"; } closedir($dir); @@ -201,7 +201,7 @@ if ($dir = @opendir("/tmp")) { $handle=opendir('.'); echo "Directory handle: $handle\n"; echo "Files:\n"; -while (($file = readdir($handle))!==false) { +while (false !== ($file = readdir($handle))) { echo "$file\n"; } closedir($handle); @@ -221,8 +221,8 @@ closedir($handle); <?php -$handle=opendir('.'); -while (false!==($file = readdir($handle))) { +$handle = opendir('.'); +while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "$file\n"; }