+ 1

Prolem in superglobal variable, could u guys pls help me??

<?php echo "$_SERVER['HTTP_HOST']"; echo "$_SERVER['PHP_SELF']"; echo "$_SERVER['SERVER_NAME']"; echo "$_SERVER['REMOTE_ADDR']"; echo "$_SERVER['REMOTE_HOST']"; echo "$_SERVER['REMOTE_PORT']"; echo "$_SERVER['SCRIPT_FILENAME']"; echo "$_SERVER['SERVER_PORT']"; echo "$_SERVER['SCRIPT_NAME']"; echo "$_SERVER['SCRIPT_URI']"; ?> But whn I run it, it says: Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number............

24th Dec 2016, 12:53 PM
Abdullah Omar Nasseef
Abdullah Omar Nasseef - avatar
1 Antwort
+ 2
try with this: echo $_SERVER['HTTP_HOST']; (remove the "" at echo)
24th Dec 2016, 1:09 PM
Nahuel
Nahuel - avatar