Modify dir example to accept filename '0', as per the readdir and opendir examples.

Fixed readdir example (it's using CDATA now).


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@63019 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Philip Olson 2001-11-22 10:07:52 +00:00
parent 62af7d467f
commit b62b6c3b48

View file

@ -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 @@ closedir($handle);
<?php
$handle = opendir('.');
while (false !== ($file = readdir($handle))) {
if ($file != "." &amp;&amp; $file != "..") {
if ($file != "." && $file != "..") {
echo "$file\n";
}
}