RE: [PHP] "the document contained no data"
| From: | Martin Towell | Date: | Fri, 12 Apr 2002 05:41:42 +0000 |
| Subject: | RE: [PHP] "the document contained no data" | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-92719@lists.php.net to get a copy of this message | ||
!== is correct - it's checking for type, as well as value
"strict non-equality"
-----Original Message-----
From: Phillip S. Baker [mailto:phillip@freewolf.net]
Sent: Friday, April 12, 2002 3:38 PM
To: php-general@lists.php.net
Subject: Re: [PHP] "the document contained no data"
At 10:33 PM 4/11/2002 Thursday, Phieu Huynh wrote:
>I also try the following code and still have the same problem.
>I am runing php4.0.?, solaris(linux)
>
>$dir_name = "/export/home/phuynh/php/main/student/upload/";
>$dir = opendir($dir_name);
> while (false !== ($file_names = readdir($dir))) {
> echo "$file_names";
> }
> closedir($dir);
Your while statement needs to read.
> while (false != ($file_names = readdir($dir))) {
> echo "$file_names";
> }
Not !==
But !=
Phillip
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php