How to understand this Warning?
| From: | Labunski | Date: | Tue, 17 Aug 2004 23:54:35 +0000 |
| Subject: | How to understand this Warning? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-194108@lists.php.net to get a copy of this message | ||
Hello,
How to understand this warning?
I thought maybe the directory name is incorrect, but it's fine.
The Browser said..
"Warning: readdir(): 2 is not a valid Directory resource in
C:\xxx\xxxxx\news.php no line 78".
<?php
if ($handle = opendir('news')) {
$sortArray=array();
while (false !== ($topic = readdir($handle))) { // this is line 78
if ($topic != "." && $topic != "..") {
while (false !== ($topic = readdir($handle)))
{
if($topic != "." && $topic != "..")
{
..etc. etc.
I posted just a first part (beginning) of the code, so that it were easier
to understand.
Sorry for my bad English,
Thank you very much,
Lab.