invalid argument supplied for foreach()

From: Date: Tue, 18 Feb 2003 04:27:56 +0000
Subject: invalid argument supplied for foreach()
Groups: php.general 
Request: Send a blank email to php-general+get-135945@lists.php.net to get a copy of this message
Could anyone please tell me what a valid argument would be in this script? error message Warning: Invalid argument supplied for foreach() in /home1/domains/$domain/htdocs/image.php on line 334 line 323-343 $dg = opendir("$thumb"); echo "<HTML><HEAD><TITLE>$title</TITLE><META NAME=Description CONTENT='Page Generated with ScriptCoders AutoThumbs V2.01 http://www.scriptcoders.com'></HEAD>"; PrintHeader(); echo "<center><br><img src=/content/images/br.gif><br><br>"; echo "<center><table border=0 width=90% ALIGN=CENTER VALIGN=CENTER><tr ALIGN=CENTER VALIGN=CENTER><td ALIGN=CENTER VALIGN=CENTER>"; while ( gettype($file = readdir($dg)) != boolean ) { if (! is_dir("$file")) $retVal[count($retVal)] = $file; } closedir($dg); foreach ($retVal as $newFile) if ($newFile != ".htaccess") { $li = ($li + 1); /*if (!isset($user)) { echo "<a href=$PHP_SELF?image=$newFile><img src=\"$thumb/$newFile\" width=\"50\" height=\"50\" border=1 ALIGN=CENTER VALIGN=CENTER></a>&nbsp;&nbsp;"; } else if (isset($user)) {*/ echo "<a href=$PHP_SELF?image=$newFile><img src=\"$thumb/$newFile\" border=1 ALIGN=CENTER VALIGN=CENTER></a>&nbsp;&nbsp;"; //}

« previous php.general (#135945) next »