follow-up readdir behavior I cannot understand

From: Date: Mon, 20 Sep 2004 04:00:51 +0000
Subject: follow-up readdir behavior I cannot understand
Groups: php.general 
Request: Send a blank email to php-general+get-197240@lists.php.net to get a copy of this message
PHP General List, Regarding my the previous post -- the script had another bug in it which I felt silly for having posted since it's so obvious at the very top (a misisng "=" sign). However, I am still having a problem with this script practically copied and pasted from the PHP manual. The revised script is below, the parse error I am actually seeing now after adding the = sign is as follows: Parse error: parse error, unexpected T_ECHO in D:\Inetpub\wwwroot\imagesexotic\Fall04\admin\check_set.php on line 6 Thanks... -JFB- <?php // Note that !== did not exist until 4.0.0-RC2 $root_dir = "/Users/jason/Sites/"; $folder_on_server = ""; if ($handle = opendir($root_dir . $folder_on_server)) {
    print "Directory handle: $handle\n";
    print "Files:\n";
     /* This is the correct way to loop over the directory. */
     while (false !== ($file = readdir($handle))) {
        echo "$file\n";
    }
     closedir($handle);
} ?>

« previous php.general (#197240) next »