Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Difference between $_ENV and $_SERVER

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Difference between $_ENV and $_SERVER

Postby joker850 » Thu Jun 05, 2014 12:48 pm

I am new to PHP and I am currently studying the superglobals. I kind of understand $_SEVER and I can see how it might be used however there is not much information on $_ENV. I can't really understand the differences between the two. Here is the information from the manual and it makes no sense to me:

These variables are imported into PHP's global namespace from the environment under which the PHP parser is running. Many are provided by the shell under which PHP is running and different systems are likely running different kinds of shells, a definitive list is impossible. Please see your shell's documentation for a list of defined environment variables.

Can someone please tell me what the $_ENV, what it's used for and a practical example of the differences? I would be very grateful. I have been at this now for a while and I'm getting nowhere.
joker850
New php-forum User
New php-forum User
 
Posts: 4
Joined: Fri Mar 28, 2014 11:40 am

Return to PHP coding => General

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron