Re: How to understand this Warning?

From: Date: Wed, 18 Aug 2004 00:19:28 +0000
Subject: Re: How to understand this Warning?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-194111@lists.php.net to get a copy of this message
On Wed, 18 Aug 2004 02:54:35 +0300 romans@skulme.lv (Labunski) wrote: > 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 note the "2" in that message. You are prob. resetting the readdir() parameter in the script somewhere > 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 != "..") > { > You loop twice throu the same dir? - Hannes > ..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.

« previous php.general (#194111) next »