顯示包含「Exercise 6」標籤的文章。顯示所有文章
顯示包含「Exercise 6」標籤的文章。顯示所有文章

3/23/2009

Exercise 6

6.1. In this exercise with can call up and examine some environment variables on the server. The code below has the unix environment variable for storing your remote Internet address. UNIX environment variable are recognised by the use of upper case letters. Try the same code by replacing with $ REMOTE_ADDR $SERVER_NAME, or $PHP_SELF

The below screendump shows some php code which is replaced by $REMOTE_ADDR.


The below screendump shows some php code which is replaced by $SERVER_NAME.


The below screendump shows some php code which is replaced by $PHP_SELF.





6.2. Create a web application called "hello_world.php" which contains in the body:

"$myvar = "Hello World!"; echo $myvar;?>
The result is showed in the following: