hello world program in php
As you are new, you dont know where to put your php files. Ok dont worry, open your editor and create a file named HelloWorld.php and place it in the htdocs folder. like this C:\xampp\htdocs\HelloWorld.php and follow me...
HelloWorld.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=utf-8" /> <title>hello world program in php</title> </head> <body> <div style="color:orange; font-weight:bold; padding:5px; text-align:left;"> <?php print "Hello World - this is my first program in php.";?> </div> </body> </html>
hello world program in php example - output

No comments:
Post a Comment
leave your comments here..