|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-03 00:27 UTC] asgarbutt at ucdavis dot edu
[2004-09-03 00:37 UTC] asgarbutt at ucdavis dot edu
[2004-09-03 08:27 UTC] helly@php.net
[2004-09-03 21:03 UTC] nlopess@php.net
[2020-02-07 06:11 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 11:00:01 2025 UTC |
Description: ------------ When utilizing the new DirectoryIterator of PHP5 (5.0.1) I get the following message. Fatal error: Call to undefined method DirectoryIterator::fileExt() in C:\Apache2\htdocs\imagearchive\test.php on line 40 The function is listed in the documentation but only minimumly. Reproduce code: --------------- $sPath = 'C:\Apache2\htdocs' foreach (new DirectoryIterator($sPath) as $oFile) { if ($oFile->isFile()) { echo 'isFile => '.$oFile->isFile().'<br />'; echo 'getFilename => '.$oFile->getFilename().'<br />'; echo 'fileType => '.$oFile->fileType().'<br />'; } } Expected result: ---------------- isFile => 1 getFilename => apache_pb.gif fileType => .gif (or something similar) Actual result: -------------- isFile => 1 getFilename => apache_pb.gif Fatal error: Call to undefined method DirectoryIterator::fileType() in C:\Apache2\htdocs\imagearchive\test.php on line 40