Hi ihrs, komische sache...
also hab nen array:
$news_layout = array('/layout/news/news_01.php',
'/layout/news/news_02.php',
'/layout/news/news_03.php',
'/layout/news/news_04.php',
'/layout/news/news_05.php',
'/layout/news/news_06.php');
und eine schleife:
$c = 0;
while ($c < 6) {
include "$news_layout[$c]";
echo "<hr />";
$c++;
}
Die Dateien (news_01.php usw.) liegen in
root/layout/news/
und einmal zum testen nur im root/
Wenn die schleife durch läuft folgende Meldung:
Warning: main(/layout/news/news_01.php) [function.main]: failed to open stream: No such file or directory in root\index.php on line 63
dann das Ganze so probiert:
$news_layout = array('\layout\news\news_01.php',
'\layout\news\news_02.php',
'\layout\news\news_03.php',
'\layout\news\news_04.php',
'\layout\news\news_05.php',
'\layout\news\news_06.php');
Meldung:
Warning: main(\layout\news\news_01.php) [function.main]: failed to open stream: No such file or directory in root\index.php on line 63
letzter Test:
$news_layout = array('news_01.php',
'news_02.php',
'news_03.php',
'news_04.php',
'news_05.php',
'news_06.php');
Da klappt es.
Wo ist der Fehler?
MfG lvl