Эй, ребята, что я тут не так понял?
$dir = get_bloginfo('template_url').'/images/headers/';
echo $dir;
//ouput: myblog.com/wp-content/themes/mytheme/images/headers
$dir = new DirectoryIterator(get_bloginfo('template_url').'/images/headers/');
echo $dir;
//output: nothing at all! blank page!
консоль выдаёт fatal_error:
[26-Apr-2011] Неустранимая ошибка PHP: Uncaught исключение«RuntimeException» с сообщением «DirectoryIterator :: __ construct (http://myblog.com/wp-content/themes/mytheme/images/headers/) [directoryiterator .-- construct]: не удалось открыть dir: не реализовано» в /Users/myname/htdocs/myblog.com/wp-content/themes/mytheme/inc / header-image.php: 3 Трассировка стека:
0 /Users/myname/htdocs/myblog.com/wp-content/themes/mytheme/inc/header-image.php(3):
DirectoryIterator -> конструкция __ ('http://oberperf. ..')
1 /Users/myname/htdocs/myblog.com/wp-content/themes/mytheme/header.php(69):
include ('/ Users / myname ...')
2 /Users/myname/htdocs/myblog.com/wp-includes/theme.php(1112):
require_once ('/ Users / myname ...')
3 /Users/myname/htdocs/myblog.com/wp-includes/theme.php(1088):
load_template ('/ Users / myname ...', true)
4 /Users/myname/htdocs/myblog.com/wp-includes/general-template.php (34):
locate_template (Array, true)
5 / Users / myname в /Users/myname/htdocs/myblog.com/wp-content/themes/mytheme/inc/header-image.php
в строке 3
Есть идеи, что здесь не так?