mpacaon
07-31-2008, 06:45 AM
Hi!
Sorry for the total noob question. I just would like to ask if its possible to view my PHP codes (even just the simple "Hello World" in echo) even if I don't have database yet.
My PHP codes are inside/saved as .html and as follows:
<html><head><title>Untitled Document</title></head>
<body>
<?php
/* Turn on error reporting */
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$name = "Em";
$age = 19;
$school = "De La Salle University";
/* Output text using echo */
echo "Hello World";
// Output text using print
print "Hello " . $age . " years old " . $name ".";
echo "Your name has " . strlen($name) . " letters."; // Em: length = 2
echo "The word \"University\" is found at the " . strpos($school, "University") . " th position." // University: starting position = 12 (because counting starts at 0)
?>
</body>
</html>
Sorry for the total noob question. I just would like to ask if its possible to view my PHP codes (even just the simple "Hello World" in echo) even if I don't have database yet.
My PHP codes are inside/saved as .html and as follows:
<html><head><title>Untitled Document</title></head>
<body>
<?php
/* Turn on error reporting */
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$name = "Em";
$age = 19;
$school = "De La Salle University";
/* Output text using echo */
echo "Hello World";
// Output text using print
print "Hello " . $age . " years old " . $name ".";
echo "Your name has " . strlen($name) . " letters."; // Em: length = 2
echo "The word \"University\" is found at the " . strpos($school, "University") . " th position." // University: starting position = 12 (because counting starts at 0)
?>
</body>
</html>