philip Thu Nov 22 05:07:52 2001 EDT
Modified files:
/phpdoc/en/functions dir.xml
Log:
Modify dir example to accept filename '0', as per the readdir and opendir examples.
Fixed readdir example (it's using CDATA now).
Index: phpdoc/en/functions/dir.xml
diff -u phpdoc/en/functions/dir.xml:1.25 phpdoc/en/functions/dir.xml:1.26
--- phpdoc/en/functions/dir.xml:1.25 Sat Nov 17 22:07:17 2001
+++ phpdoc/en/functions/dir.xml Thu Nov 22 05:07:52 2001
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.25 $ -->
+<!-- $Revision: 1.26 $ -->
<reference id="ref.dir">
<title>Directory functions</title>
<titleabbrev>Directories</titleabbrev>
@@ -94,7 +94,7 @@
$d = dir("/etc");
echo "Handle: ".$d->handle."<br>\n";
echo "Path: ".$d->path."<br>\n";
-while ($entry = $d->read()) {
+while (false !== ($entry = $d->read())) {
echo $entry."<br>\n";
}
$d->close();
@@ -242,7 +242,7 @@
<?php
$handle = opendir('.');
while (false !== ($file = readdir($handle))) {
- if ($file != "." && $file != "..") {
+ if ($file != "." && $file != "..") {
echo "$file\n";
}
}