Re: why doesn't this work ?

From: Date: Sun, 18 Apr 2004 03:10:27 +0000
Subject: Re: why doesn't this work ?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-183754@lists.php.net to get a copy of this message
I put this in the body of an html file: <?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && eregi('\.html$', $file)) { echo "<li><a href=\"$file\"><font color=\"#CC0000\">$file</ font></a></li><br>"; } } closedir($handle); } echo "</ul>"; ?> the output page contains : $file "; } } closedir($handle); } echo " "; ?> I don't understand why. "Daniel Clark" <dclark@nwlink.com> wrote in message news:20040417232405.422396DB66@smtp3.pacifier.net... > Can you post the code and error. > > > >>I took out the scrip tags and put in <?php in the beginning and ?> at the > >>end, but it returns this: > >> > >>$file > >>"; } } closedir($handle); } echo " > >>"; ?>

« previous php.general (#183754) next »