Pls can any tell me how to do this bbcode [ php ] code here [ /php ]
have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com
Started on the old forum in March 2011 · view the original in the archive · old links redirect here
Pls can any tell me how to do this bbcode [ php ] code here [ /php ]
have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com
$string = preg_replace('#\[php\](.*?)\[\/php\]#se', "'<div>' . highlight_string(stripslashes('$1'), true) . '</div>'", $string);
where $string is your input string (forum post for example)..
Thanks you!
have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com
$string = preg_replace('#\[php\](.*?)\[\/php\]#se', "'<div>' . highlight_string(stripslashes('$1'), true) . '</div>'", $string);where $string is your input string (forum post for example)..
not working
have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com
\1
$string = preg_replace('#\[php\](.*?)\[\/php\]#se', "'<div>' . highlight_string(stripslashes('\\1'), true) . '</div>'", $string);
Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!
SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…
$super="something else"; echo "thank you $super"; Added after 2 minutes: What can i use to prevent my post so not to hack by hacker with this bbcode
have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com
i dont know where my post went to in this topic lol $1 is the same as \1 just depends on what php editor you use also the " " at the start and end of the replacement need removing eg:
$string = preg_replace('#\[php\](.*?)\[\/php\]#se', '<div>' . highlight_string(stripslashes('$1'), true) . '</div>', $string);
//some text here to get rid of opera bug and this forum :/
you may also need to do string replacements on to "" and htmlspecialchars_decode() if you have already used htmlspecialchars()
adex3g wrote: $super="something else"; echo "thank you $super"; Added after 2 minutes: What can i use to prevent my post so not to hack by hacker with this bbcode
Providing it is used properly then any html inserted into the [ php] tags should not get executed by the browser 🙂