external_plugin and globals
Posted: Thu Jul 07, 2005 9:33 pm
I'm having some strange behavior related to global variables, and I wonder if anyone can comment as to what is going on here, and what config setting causes this behavior. I define an external_plugin:
When I call through /plugin/ URL I get:
When I load ext.php directly I get:
I thought it was related to register_globals=Off, but that does not seem to be the case.
Code: Select all
case 'external_plugin':
include 'ext.php';
return true;
break;Code: Select all
<?
$abc = "my test";
$GLOBALS['def'] = "strange";
function printme() {
global $abc;
global $def;
echo "abc is: ".$abc."<br />";
echo "def is: ".$def."<br />";
}
printme();
?>Code: Select all
abc is:
def is: strangeCode: Select all
abc is: my test
def is: strange