Click to See Complete Forum and Search --> : Need to display .log file in an iframe


scaiferw
09-06-2005, 07:05 AM
I need to display a log file in an iframe element, but cannot seem to do it if the file extension is .log. It works with a .txt file, not a .log file.

<iframe src='lab/logs/DCDiag.log' width='100%' height='600' align=left>

Anybody have any ideas?

Thanks,

Rob

NogDog
09-06-2005, 12:36 PM
Probably better would be to use server-side includes or a server-side script to incude the log file at that point. For instance, if PHP is enabled on your web host, you could just do the following:

<pre id="log"><?php include("lab/logs/DCDiag.log"); ?></pre>

If you want borders, scrollbars, etc., just add the necessary CSS elements for the pre#log selector in your <style> section or stylesheet.