+11

Why its not working...???

https://code.sololearn.com/wV6RjQN68kxi/?ref=app

12/5/2018 1:41:00 PM

Programmer_Viral

6 Answers

New Answer

+12

Mohamed ELomari its working fine on localhost... But not working on SoloLearn..

+6

from http://php.net/manual/en/reserved.variables.server.php : "$_SERVER" is an array containing information such as headers, paths, and script locations. the entries in this array are created by the web server. " there is no guarantee that every web server will provide any of these, servers may omit some, or provide others not listed here. "

+4

i try this: https://code.sololearn.com/w6BOt9tcWVtC/#php and founded that those keys you'd specifies were unset it.

+3

Hamid what????

0

student

0

The three functions you have written, remote_addr etc. gives you the ip address of your server but this php compiler does not have any server, therefore this error is coming. If you placed same code on localhost or any other free online servers it will work.