Help plz!

From: Date: Tue, 12 Dec 2000 18:42:49 +0000
Subject: Help plz!
Groups: php.general 
Request: Send a blank email to php-general+get-29921@lists.php.net to get a copy of this message
What is wrong in this script. It reports "Warning: Unable to find file identifier 2 ......skip skip....ist.php3 on line 10" <?php $build = ""; $flag = 0; $handle=opendir('.'); while ($file = readdir($handle)) if ($file != "." && $file != ".." && ereg(".htm$", $file)) $fp = fopen ("$file", "r"); for ($i=0; !feof($fp); $i++){ $line = fgets($fp, 1024); if (ereg("^<title>", $line)) $flag = 1; if ($flag == 1) $build = $build.$line; if (ereg("</title>", $line)) { $flag = 0; fclose ($fp); } } if ($build > ""){ $build = ereg_replace("<title>", "", $build); $build = ereg_replace("</title>", "", $build); $build = trim($build); $tit=$build; $build=""; } echo "<tr><td>"; echo "<a href="; echo $file; echo ">"; echo $tit; echo "</a></td>"; } } closedir($handle); ?> It

« previous php.general (#29921) next »