Jump to content

How to display only certain code from an fOpen()


ActaNonVerba1

Recommended Posts

Hey guys,

 

I'm opening a HTML file from my server, and i can successfully echo it both as code to show the page, and as code which the person can then edit in a <textarea>.

 

However, there are certain sections of the code i do not what echo'd to the page. What is the best way to go about stipping them? For example i do not want the user to be able to edit the doctype, head element, <header> or <nav> sections of the code.

 

Thanks in advance

Danny.

typically the content is stored in a database and PHP is used to add the non-editable elements. alternatively, you could store the content in a separate file and use PHP to add the non-editable elements.

 

in the end, creating individual HTML files and stripping off the non-editable parts, then re-adding them is going to be more difficult than other options.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.