开发者

Fatal error: Cannot instantiate non-existent class: directoryiterator

开发者 https://www.devze.com 2022-12-14 14:23 出处:网络
Need some help with this error. Fresh wordpress 2.9 install... Fatal error: Cannot instantiate non-existent class: directoryiterator in /home1/test/public_html/test2/wp-content/themes/mytheme/functio

Need some help with this error. Fresh wordpress 2.9 install...

Fatal error: Cannot instantiate non-existent class: directoryiterator in /home1/test/public_html/test2/wp-content/themes/mytheme/functions.php on line 471

function get_dirs($path = '.') {
$dirs = array();
foreach (new DirectoryIterator($path) as $file) {   //THIS IS LINE 471
    i开发者_Go百科f ($file->isDir() && !$file->isDot()) {
        $dirs[] = $file->getFilename();
    }
}

return $dirs;

}


The DirectoryIterator class is part of the Standard PHP Library (SPL), which is installed by default in PHP 5. Maybe you are using PHP 4?

EDIT

To get information on your PHP installation, use phpinfo(). Create a .php file with this single line and open it in your browser:

<?php phpinfo() ?>
0

精彩评论

暂无评论...
验证码 换一张
取 消