Webmaster Forum Rules | Posting Guide | Contact Us | Testimonials | Contributing Geek Program | Advertise on Geek/Talk
Welcome to the GeekTalk Webmaster Discussion Forums from GeekVillage.com

Click Here To Register. It's Free!

Go Back   geek/talk: Signature-free discourse for serious web publishers > YOUR CREATION: Building & Maintaining A Web Site > Web Development - Programming / Coding
User Name
Password
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 12-28-2015, 01:53 AM   #1
beingchinmay
Registered User
 
Join Date: Jun 2015
Posts: 246
Arrow Using $_SERVER and $_ENV in PHP ..

The $_SERVER and $_ENV arrays contain different information, depending on the server and operating system youíre using. You can see what information is in the arrays for your particular server and operating system by using the following statements:

Quote:
foreach($_SERVER as $key =>$value)
{
echo ďKey=$key, Value=$value\nĒ;
**
The output includes such lines as the following:

Quote:
Key=DOCUMENT_ROOT, Value=c:/program files/apache
group/apache/htdocs
Key=PHP_SELF, Value=/test.php
The DOCUMENT_ROOT element shows the path to the directory where Apache
expects to find the Web page files.

The PHP_SELF element shows the file that contains the script that is currently running.

You can see the information in the $_ENV array by using the phpinfo() statement with a 16 to specify the environmental variables, as follows:

Quote:
phpinfo(16);
Built-in arrays are available only if track-vars is enabled. As of PHP 4.0.3, track-vars is always enabled, unless the PHP administrator deliberately turns track-vars off when installing PHP. Itís rare that track-vars would be turned off. If the built-in arrays donít seem to be available, check with phpinfo() to make sure that track-vars is turned on. If itís turned off, PHP has to be reinstalled.









Step Up Height Increaser |
Hair Building Fiber
beingchinmay is offline   Reply With Quote
Reply

Bookmarks

Tags
asp .net, php

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Please support our advertisers. They ensure our survival.

All times are GMT -5. The time now is 10:26 AM.


GeekVillage.com is copyright © 1998-2015 Curiosity Cave - Science gifts for clever kids. All rights reserved.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.