{Semi-Resolved} MyBB 'Variable Scope' 101
Firefox Wins Offline
Member
***
Posts: 164
Joined: Mar 2008
Post: #5
RE: MyBB 'Variable Scope' 101
With your help, I figured it out now.   Smile

(09-20-2010 03:39 PM)ZiNgA BuRgA Wrote:  ... but sourced inputs are conflicting or similar)...

Of course you are correct, and now I know why:
My original example was over-simplified, I should have mentioned the tasks folder

PHP Code:
// include file located in 'tasks' folder does NOT work (for defining some variables), after define("IN_MYBB...
require_once "./inc/tasks/example2.php";


PHP Code:
// Using the same include file placed in 'myvars' folder *does* work
require_once "./inc/myvars/example2.php";

  • So globals.php, or a related file, 'scans' every file in ./inc/tasks folder, even if the 'task' is not active.
^^^
The above statement must be true, or there is a HUGE hole in my logic.
Thanks again Zinga.
(This post was last modified: 09-20-2010 05:48 PM by Firefox Wins.)
09-20-2010 05:37 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: MyBB 'Variable Scope' 101 - Firefox Wins - 09-20-2010 05:37 PM

 Standard Tools
Forum Jump: