mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Let's use __DIR__
Patch by André Fiedler git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@333665 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
9514f50e89
commit
8e5b51f313
2 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$iterator = new DirectoryIterator(dirname(__FILE__));
|
||||
$iterator = new DirectoryIterator(__DIR__);
|
||||
while($iterator->valid()) {
|
||||
$file = $iterator->current();
|
||||
echo $iterator->key() . " => " . $file->getFilename() . "\n";
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$iterator = new FilesystemIterator(dirname(__FILE__), FilesystemIterator::CURRENT_AS_PATHNAME);
|
||||
$iterator = new FilesystemIterator(__DIR__, FilesystemIterator::CURRENT_AS_PATHNAME);
|
||||
foreach ($iterator as $fileinfo) {
|
||||
echo $iterator->current() . "\n";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue