-1

i have try this code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org   /TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php phpinfo(); die; ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>TRY IT</title>
</head>
<body>
<?php
echo "test";
?>
</body>
</html>

It is very simple echo syntax in php. Output that should i got is string "test" on my screen. but output that i got just a blank page. For your information php version that installed on my computer is version 5.3.8 anyone know what happen?

mas_bejo
  • 597
  • 2
  • 6
  • 22

1 Answers1

3

Remove the die on the second line.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org   /TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php phpinfo(); die; ?>
                 ^^^^ Remove this
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>TRY IT</title>
</head>
<body>
<?php
echo "test";
?>
</body>
</html>
Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
Kamehameha
  • 5,423
  • 1
  • 23
  • 28