MYBB THIS_SCRIPT?
#1
How can I make this work wit MYBB THIS_SCRIPT  ?

$script = basename($_SERVER["SCRIPT_FILENAME"]);

if (($script == 'editpost.php'))
Reply
#2
Hey, I didn't quite understand your question,

THIS_SCRIPT refers to the actual page the code is being executed in, if you want to compare it to a constant, you could use :

<?php

if(defined('THIS_SCRIPT') && THIS_SCRIPT == 'editpost.php') {
    // we are in editpost.php
}
Rasmus Lerdorf Wrote:If eval() is the answer, you're almost certainly asking the wrong question. - Rasmus Lerdorf
Reply
#3
Exactly thanks very much. I want the script run only if the page is editpost.php Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)