View Full Version : display html source in textarea
I would like to display a html file after it has been rendered with php in Text area so user can copy or edit souce code.
I was able to open html file and print it fine. but it shows the PHP code and its not wha the final html output source looks like.
So can someone help me by showing me how i can do something like this.
thanks in advance,
12-21-2003, 10:22 AM
Absolute url ...
would show the HTML output of file.php , wheras
would show the PHP code.
12-22-2003, 05:02 PM
Stuntboy just pointed out that the code I posted above would lead to an infinate loop and possible server death if you are trying to show HTML output of the current file !
that's not how I originally read your question but that appears to be what you actually meant ?
I am definately going to have to put a disclaimer in my sig somewhere ;)
So working on an answer now if Stunt does not beat me to it
Here's how it's done client side, anway: (pulled from a favelet (http://www.codingforums.com/showthread.php?s=&threadid=4437#post20550) so the code might not be completely relevant)
12-22-2003, 05:30 PM
not sure about the ligitmacy of using querystrings from within an include call however.
EDIT: no more typo :p
12-22-2003, 06:06 PM
that works a treat , just a typo here
but better a typo than infinate recursion :D
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.