This topic is locked

$_SERVER["REMOTE_ADDR"] error

6/16/2011 5:35:16 AM
PHPRunner General questions
A
aclhkaclhk author

I add the following code to After application initialized event

$ip = $_SERVER["REMOTE_ADDR"];
I get error :

Parse error: syntax error, unexpected ']'in include/appsettings.php on line 278
I check line 278 is above code. It is nothing wrong in syntax. if I set $ip = "A" , no error return.

C
cgphp 6/16/2011



I add the following code to After application initialized event

$ip = $_SERVER["REMOTE_ADDR"];
I get error :

Parse error: syntax error, unexpected ']'in include/appsettings.php on line 278
I check line 278 is above code. It is nothing wrong in syntax. if I set $ip = "A" , no error return.


Be sure to use double quotes or single quotes:

$ip = $_SERVER["REMOTE_ADDR"];


or

$ip = $_SERVER['REMOTE_ADDR'];
A
aclhkaclhk author 6/16/2011



Be sure to use double quotes or single quotes:

$ip = $_SERVER["REMOTE_ADDR"];


or

$ip = $_SERVER['REMOTE_ADDR'];



Whenever I use double quote or single quote return syntax error. Phprunner is 5.3

Sergey Kornilov admin 6/16/2011

You need to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.