Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hi,

 

I have been going through the lessons/examples but am stumped on the first dynamic script on page 36 (script 1.5)

 

Here is what I wrote:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML

1.0 Transitional//EN" "http://www.w3.org/

TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml"

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.5 predefined.php

# May 21 2011

 

// Create a shorthand version of the variable names:

 

$file = $_SERVER[‘SCRIPT_FILENAME’];

$user = $_SERVER[‘HTTP_USER_AGENT’];

$server = $_SERVER[‘SERVER_SOFTWARE’];

 

// Print the name of this script:

echo "<p>You are running the file:<br /><b>$file</b></p>\n";

 

// Print the user’s information:

echo "<p>You are viewing this page using:<br /><b>$user</b></p>\n";

 

// Print the server’s information:

echo "<p>This server is running:<br /><b>$server</b>.</p>\n";

 

?>

 

</body>

</html>

 

And I get nothing. The page is here: http://matrixfiles.com/lu/predefined.php

 

On my computer webserver (Wamp) I get this page (screenprint):

 

error-1.jpg

 

This has completely puzzled me. Anyone know what I am doing wrong? I have double checked the code and nothing seems to be out of place.

Link to comment
Share on other sites

 Share

×
×
  • Create New...