Forum Moderators: coopster
<IfModule mod_php5.c>
php_value auto_prepend_file "/my.php"
</IfModule> but this script can't get _SERVER["REMOTE_ADDR"], only if i tun register_globals = On
Hier is a test script. It can get $_SERVER['REMOTE_ADDR'] unter register_globals = Off.
if i type in browser:
http://mysite.com/test.php test script:
<?php
$ip = $_SERVER['REMOTE_ADDR'];
echo '$ip';
?> but if it run in schell
>php test.php anyone knows, how to fix this problem.
include(), require()and the httpd-launched
auto_prepend_fileall work the same way:- they drop the contents of the referenced-file into your current file, just as if that file contained the code in the first place.
Therefore, it depends on how you call the original file:
$_SERVER['REMOTE_ADDR']variable.
$_SERVER['REMOTE_ADDR']variable supplied.