mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
62af7d467f
commit
b62b6c3b48
1 changed files with 3 additions and 3 deletions
|
@ -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 != "." && $file != "..") {
|
||||
if ($file != "." && $file != "..") {
|
||||
echo "$file\n";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue