Friday, August 27, 2010

Lesson 3 : Comments in php


<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo 'Hello World'; ?> </title>
</head>

<body>

<?php echo 'my first file'; 

// this is a comment

/*
This is
a comment
block
*/
 

?>
</body>
</html>

Lesson 2 : Create first file in php

step 1 : create "test" folder in your root
root folder in wamp : path/wamp/www/
root folder in xampp : path/xampp/htdocs/
root folder in AppServ : path/AppServ/www/

step 2: create hellloworld.php


<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo 'Hello World'; ?> </title>
</head>

<body>

<?php echo 'my first file'; ?>
</body>
</html>



step 3: open browser
step 4: paste this url in address bar http://localhost/test/hellloworld.php

Friday, August 20, 2010

Lesson 1 : Install Apache distribution containing MySQL and PHP

Step 1. download wamp, AppServ or xampp
you can download these from here
wamp
AppServ
xampp

Step 2: install one of these