Here is my code:
The ProblemCode:<?php if($fileContents == "New Page"){ echo "Please select a layout for this new page.<br />"; if ($handle = opendir('layouts')) { $count = 0; while (false !== ($file = readdir($handle))) { if ($file != "thumbnails" && $file != "." && $file != "..") { echo "<iframe src='layouts/$file' style='width:200px;height:200px;' />"; $count++; } } closedir($handle); } echo "<br />Count: $count"; } ?>
After the first Iframe is echoed, the PHP exits, just as if I were to use exit();. If I replace echo "<iframe...." with echo $file, it displays three files - which means there should be three Iframes when using the Iframe echo statement. Why is the Iframe exiting my PHP code?




Reply With Quote