I'm working on a basic website manager. I've incorporated an open source html editor, but it doesn't know what to do with <!--#include virtual="/path/to/file.html" -->
So it ignores it and does not show it in the editor.. What I want to do is replace an instance like that with something like {INCLUDE=/path/to/file.html} in the $html variable (which contains the web page html that I'm editing).. so that appears (instead of the blank spot where the other code would be) when I load $html in the HTML editor. then when I submit the modified HTML in the editor, I want to replace {INCLUDE=/path/to/file.html} with the appropriate code <!--#include virtual="/path/to/file.html" --> in $_POST[html] so I can save it to a .html file.
Can someone help me.. or just point me in the right direction?
My PHP application simply opens a .html file and puts the contents into the editor window.. then when the editor window is saved, it writes the contents back to the .html file.. a php include doesn't apply here
Right... but then what is the virtual include for? The virtual include does the same thing PHP include does... read the contents, display in place... maybe I misunderstood your problem?
I have a file manager. I want to open an html file and get the contents so I can display it in the editor window of my file manager.. but before I place the code in the editor window, I want replace all virtual include instances with a more friendly code like {INCLUDE=/path/to/file.html}
so I need to search the $html variable for all virtual includes and replace it with the other code.. then after I save the page, I need to replace all instances of {INCLUDE=/some/file.html} to the vritual include code so I can write it back to the .html file
I don't need to parse the data that's in the other file, I just need to replace the code that points to it..