vanauden
asked on
php 5.2 register_globals setting not functionning
PHP 5.2, Windows 2003, Apache 2.0
Register_Globals are OFF in php.ini but global variables are still enabled. This is my test script:
No .htaccess files are present.
<?php
$test="hello world";
testfunc();
function testfunc()
{
global $test;
echo $test;
}
?>
It produces the following output: hello world
Is there another setting that manages the global variables for PHP???
Register_Globals are OFF in php.ini but global variables are still enabled. This is my test script:
No .htaccess files are present.
<?php
$test="hello world";
testfunc();
function testfunc()
{
global $test;
echo $test;
}
?>
It produces the following output: hello world
Is there another setting that manages the global variables for PHP???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok I understand -
follow up question:
does the global keyword also work in php version 4??
follow up question:
does the global keyword also work in php version 4??
According to the PHP manual on this topic, the keyword does exists in PHP 4:
http://www.php.net/global
http://www.php.net/global
global $test;
Remove that and it won't work anymore