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:









1 則留言:

  1. I don't know why I can't get the results returned.

    Do you have any idea about that?

    Ernest

    回覆刪除