I am using a wysiwyg editor in a web app. It is FCKeditor. In order to edit a file, other than loading javascript, my web form that edits the the file looks like this:
<textarea><?php include('myWebDoc.html') ?></textarea>
I also tried this:
<textarea><?php file_get_contents('myWebDoc.html') ?></textarea>
Both attempts end up parsing the php inside the web document before it gets to the editor.
Is there a better php function or way to get the contents of a file into the textarea tag without parsing?
The correct form should be something like this:
<textarea><?php echo htmlspecialchars(file_get_contents('/path/to/file.html')); ?></textarea>
Depending on the contents of the HTML file you might also want to try htmlentities().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With