note 102584 added to directoryiterator.construct

[email protected] Tue, 22 Feb 2011 18:00:25 -0800
Newsgroups php.notes
Message-ID <[email protected]>
well, using clients it in multiple plattforms standard function are still required!
<?php
$paths = array('/tmp/', 'c:/tmp/');
foreach ($paths as $path) {
foreach (new DirectoryIterator($path) as $file) {
// ...
?>

if you are on *nix systems the windows path 'c:/tmp/' will throw an exception :-/

So check with is_dir() or someting before using it.
----
Server IP: 69.147.83.197
Probable Submitter: 80.171.35.242
----
Manual Page -- http://www.php.net/manual/en/directoryiterator.construct.php
Edit        -- https://master.php.net/note/edit/102584
Del: integrated  -- https://master.php.net/note/delete/102584/integrated
Del: useless     -- https://master.php.net/note/delete/102584/useless
Del: bad code    -- https://master.php.net/note/delete/102584/bad+code
Del: spam        -- https://master.php.net/note/delete/102584/spam
Del: non-english -- https://master.php.net/note/delete/102584/non-english
Del: in docs     -- https://master.php.net/note/delete/102584/in+docs
Del: other reasons-- https://master.php.net/note/delete/102584
Reject      -- https://master.php.net/note/reject/102584
Search      -- https://master.php.net/manage/user-notes.php