2008-09-04, 02:57 AM
Hi,
I didn't know where else to ask this question. How does MyBB prevent PHP from being parsed in the templates? I need to mimic this feature, but I'm a novice and MyBB's code confuses me.
I need to create a file with an extension of .php, but I need the content of a PHP variable to be checked and have all PHP removed from it. I could do
Any help?
Thanks!
lupus6x9
I didn't know where else to ask this question. How does MyBB prevent PHP from being parsed in the templates? I need to mimic this feature, but I'm a novice and MyBB's code confuses me.
I need to create a file with an extension of .php, but I need the content of a PHP variable to be checked and have all PHP removed from it. I could do
str_replace("<?", "&lt;?", $var);
str_replace("?>","?&gt;",$var);
str_replace("<%","&lt;%",$var);
str_replace("%>","%&gt;",$var);
, but <script language="php">
can also work depending on the host, and there's no str_replace method that can guarantee a fix for that.Any help?
Thanks!
lupus6x9