PHP: preview an html file.

From: Date: Thu, 25 Jul 2002 10:12:22 +0000
Subject: PHP: preview an html file.
Groups: php.general 
Request: Send a blank email to php-general+get-109460@lists.php.net to get a copy of this message
Hello everybody, I hope u can help me with this. I'll be very grateful! This file retrieves a list of files from a folder on the server and then has to diplay a list of them. When selecting one of them in the list, it should display a preview (i.e. its contents) in the same file. I think i should use frames but donno how to do it :(. Thx a lot <?PHP $d = dir("/home/mcms/public_html/MCMS/Alia/pageTmp"); ?> <html> <head> </head> <body> <form method="POST" action="showTree.php"> <p><b>Plz select a page template:</b></p> <p><select size="1" name="pageList" > <?PHP while (false !== ($entry = $d->read())) { if ($entry != '.' && $entry != '..') echo '<option value="'.$entry.'">'.$entry.'</option>.\n'; } ?> </select></p> <p><input type="submit" value="Create" name="createButton" > <input type="hidden" value="/home/mcms/public_html/MCMS/Alia/pageTmp/" name="pageField" /></p> <?PHP /*if (!$file = fopen("/home/mcms/public_html/MCMS/Alia/pageTmp/ $pageList", "rb")){ echo("couldnt open the file."); } else{ fpassthru($file); }*/ ?> </form> </body> </html> <?PHP $d->close(); ?>

« previous php.general (#109460) next »