sakr
-
Posts
1 -
Joined
-
Last visited
Never
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Counting Files and dynamic content HELP
in PHP Coding Help
Posted
Warning: opendir(/articles/): failed to open dir: No such file or directory in /home/content/d/o/s/dossilfuels/html/index.php on line 20
The code is:
[code] <?php
if ($handle = opendir('/articles/')) {
$cnt=0;
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$cnt++;
}
}
}
$counttop = $cnt;
$countbot = $cnt - 6;
while ($counttop > $countbot){
include("articles/article".$counttop."php");
$counttop--;
}
?>[/code]
I also tried removing the "/" at the end of "/articles", but the same message came up.
Thanks you very much for any help I get!
(p.s. the site is [a href=\"http://dossilfuels.com\" target=\"_blank\"]http://dossilfuels.com[/a])