I have an issue with a PHP file that embeds some Javascript in the page. The JS is using the underscore templating engine, which happens to use ASP-style tags (<% ... %>) for output.
The client’s PHP configuration has the ASP-style tags enabled, which is breaking the file syntax.
Is there any kind of directive I can add at the top of the file, or any other trick to get the PHP processor to ignore these tags? I’m specifically looking for a way to do this without modifying php.ini. But if that’s the only way, please let me know.
Try this
.htaccessfile:And if you just want to disable the asp tags for just one file uses this rule here: