on our intranet site we allow employees to upload files that then get wrapped by our header and view as a web page.
for security purposes i would like to strip out every occurance of <% <?php and <?
from the file.
can i do this without opening the file, reading the entire contents of the file into a string, doing a str_replace or ereg_replace, and then writing it back to a file?
i am using a solaris server with the latest apache, php, mysql.