07.04.2013, 22:28
I'm learning it from a book, but the book is 10 years old so I guess this is one of the occassional problems I'll find with it. Here's the code:
Basically the location comes up as . and the user PC details and IP don't come up...
Код:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml1" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>Predefined Variables</title> </head> <body> <?php # Script 1.6 - predefined.php # Created by Sam # Created April 6, 2013 // Echo the script name. echo "You are running the file <b> $PHP_SELF </b>.<br /><br />\n"; // Echo the user's information. echo 'Your are viewing this page using:<br /><b>', $HTTP_USER_AGENT, '</b><br />from the IP address ', $_REMOTE_ADDR; ?> </body> </html>