html textarea rendering
Posted: Tue Aug 14, 2007 12:58 pm
Hey folks,
I've written a little php script that allows me to edit the files on the server.
The script provides me with a textbox for executing server side commands
and a text box for a filename. There's two buttons for opening the file and saving the file
to and from a textarea underneath.
Alas when I attempt to save something like the following small html snippet as a file :-
the end of the file i.e. from </textarea> down is no longer part of the html snippet and in fact the code
is used to render the end of the editing textarea window??
I'm going a little mad trying to figure out why. i'm a newbie to php so if I've missed something obvious say the word.
The php code from the script that renders the textarea section is shown below and is actually the end of the file.
Any help is greatly appreciated.
If anyone knows of any free php editors like this and they could point me in their direction that would be great.
Thanks,
Mark.
I've written a little php script that allows me to edit the files on the server.
The script provides me with a textbox for executing server side commands
and a text box for a filename. There's two buttons for opening the file and saving the file
to and from a textarea underneath.
Alas when I attempt to save something like the following small html snippet as a file :-
Code: Select all
<html>
<body>
<form action="cmdline.php" method="post">
<textarea>
The code for the file goes in here.
</textarea>
</form>
</body>
</html>Code: Select all
</textarea>
</form>
</body>
</html>I'm going a little mad trying to figure out why. i'm a newbie to php so if I've missed something obvious say the word.
The php code from the script that renders the textarea section is shown below and is actually the end of the file.
Code: Select all
:
:
:
<textarea id="code" width="100%" height="400px" style="width: 100%; height: 600px" name="code" wrap="logical" rows="20" cols="80"><?php
OUTPUTTING THE FILE is done in HERE
?></textarea>
</form>
</body>
</html>If anyone knows of any free php editors like this and they could point me in their direction that would be great.
Thanks,
Mark.