<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=%2FHello_World%2F</id>
		<title>/Hello World/ - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=%2FHello_World%2F"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=/Hello_World/&amp;action=history"/>
		<updated>2026-05-13T12:15:14Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=/Hello_World/&amp;diff=2107&amp;oldid=prev</id>
		<title>Gyan: Created page with ''''Title of script''': Hello World  '''Author: Anurag Jain, Abhishek Kumar Srivastava'''  '''Keywords: localhost, client-server'''   {| style=&quot;border-spacing:0;&quot; | style=&quot;border-…'</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=/Hello_World/&amp;diff=2107&amp;oldid=prev"/>
				<updated>2012-12-26T09:48:48Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;#039;&amp;#039;&amp;#039;Title of script&amp;#039;&amp;#039;&amp;#039;: Hello World  &amp;#039;&amp;#039;&amp;#039;Author: Anurag Jain, Abhishek Kumar Srivastava&amp;#039;&amp;#039;&amp;#039;  &amp;#039;&amp;#039;&amp;#039;Keywords: localhost, client-server&amp;#039;&amp;#039;&amp;#039;   {| style=&amp;quot;border-spacing:0;&amp;quot; | style=&amp;quot;border-…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Title of script''': Hello World&lt;br /&gt;
&lt;br /&gt;
'''Author: Anurag Jain, Abhishek Kumar Srivastava'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: localhost, client-server'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border-top:0.035cm solid #000000;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Visual cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;Show Slide 1&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Hello, Welcome to the spoken tutorial for PHP and MySQL. In this tutorial we'll show you how to write basic PHP program and execute over Apache server. Moreover you'll learn how to embed PHP script in HTML, how to print a string and concatenate two different strings in PHP. So basically with this tutorial, we will work, for the first time, on PHP platform and give a start-up to our programming.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;Show Slide 2&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| As we'll be working on windows platform, before we start writing our codes, we need to check certain things. &lt;br /&gt;
&lt;br /&gt;
1: We'll be using XAMPP version 1.7.3 or later which have PHP 5.3.1, MySQL 5.1 and Apache 2.2. It is advised to use latest version of XAMPP only.&lt;br /&gt;
&lt;br /&gt;
2: Click XAMPP icon from your task bar or start menu.&lt;br /&gt;
&lt;br /&gt;
3: Open XAMPP control panel running in your task bar and start Apache service.&lt;br /&gt;
&lt;br /&gt;
4: Open notepad++(text editor). We'll use it as our editor throughout the tutorial ;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;Show Slide 3&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Basically PHP codes are embedded between HTML tags as per the need. It provides the flexibility and freedom to the user to display dynamic content in an organized manner.So let's start by writing a basic and conventional “Hello world” program which will print the string “Hello World”. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;Switch to editor and &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;type the code&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;|&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
   &amp;lt;head&amp;gt;&lt;br /&gt;
     &amp;lt;title&amp;gt;Hello World&amp;lt;/title&amp;gt;&lt;br /&gt;
   &amp;lt;/head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   &amp;lt;?php  //opening PHP&lt;br /&gt;
   echo &amp;quot;Hello World&amp;quot;; //prints string&lt;br /&gt;
   //closing PHP&lt;br /&gt;
   ?&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;Show Slide 4&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Let's have a look at the code.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;Its quite self explanatory, we use &amp;quot;&amp;lt;?php&amp;quot; to denote the start of PHP script and ?&amp;gt; for closing it. So this way we can start and close PHP script wherever we want, in between the HTML tags.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* 'echo' is the function used to print a given string. We can also use single quotes(') around the string instead of double quotes. This is because PHP treats both as same string. Comments in PHP are given in same manner as in C++. We'll be using '''//''' for single line comment and '''/* */''' for commenting multiple lines.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;Show Slide 5&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Now before we run this code please note that you need to do following things.&lt;br /&gt;
&lt;br /&gt;
* Now saves the file in the ''''htdocs' '''folder of XAMPP. By default on windows platform the path is ''''c:\xampp\htdocs\'''' as '''hello.php'''.&lt;br /&gt;
* Now open your web-browser like '''Firefox''' or '''Chrome '''and type [http://localhost/hello.php http://localhost/hello.php] '''or [http://127.0.0.1/hello.php http://127.0.0.1/hello.php] '''and you will see the printed Hello world string.&lt;br /&gt;
* Here is one concept which I'd like to make clear. Basically, the communication in a client server model is done via a network address, the IP address and a communication interface called Port.Since the Apache service is running on your local machine on port 80, your machine it self will act both as a client and a server. Request will be sent through your browser which requests hello.php page from server. This request is processed by Apache by compiling hello.php file stored in its '''htdocs''' and return the HTML to the browser. &lt;br /&gt;
* This HTML generated can be seen by viewing the source of the page in your browser. You can see no PHP code is displayed to client side, as it gets processed on server side and thus remains hidden and just the plain HTML is fetched. &lt;br /&gt;
&lt;br /&gt;
Now lets make some modifications in our previous code. You can embed HTML tags into PHP to define the properties of your contents on serverside.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;Switch to editor and &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;type the code&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;|&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;head&amp;gt;&lt;br /&gt;
     &amp;lt;title&amp;gt;Hello World&amp;lt;/title&amp;gt;&lt;br /&gt;
   &amp;lt;/head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;?php &lt;br /&gt;
     echo &amp;quot;&amp;lt;b&amp;gt;&amp;quot;.&amp;quot;Hello&amp;quot;.&amp;quot; World&amp;quot;.&amp;quot;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;quot;;/* &amp;lt;b&amp;gt; is a HTML tag for printing text in BOLD */&lt;br /&gt;
                                            /* '.' is a PHP operator for joining (concatenating) two strings.*/&lt;br /&gt;
                                            /* &amp;lt;br&amp;gt; is a HTML tag for changing it to new line.*/&lt;br /&gt;
     printf (&amp;quot;hi&amp;quot;); //a 'c' type function to print strings.&lt;br /&gt;
   ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;/body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;Show Slide 5&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Run this code in similar manner after saving it and you will see some difference.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;The Hello World string becomes bold by using &amp;lt;b&amp;gt;tag.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* And a linefeed is given printing 'hi' in next line.&lt;br /&gt;
* Also 'printf()' is another function similar to 'echo' which prints the given string.&lt;br /&gt;
* The '.' is a PHP operator to join(concatenate) strings together.&lt;br /&gt;
&lt;br /&gt;
This way we can generate HTML using PHP code. But this is not a good practice to generate unnecessary HTML code using PHP.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;Show Slide 6&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Well I think by this tutorial you would have learned to write and execute basic PHP programs and execute them over Apache on the local machine. You'll be learning more language grammar and syntax in the upcoming tutorials. Thank you.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;Show Slide 7&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.035cm solid #000000;border-left:0.035cm solid #000000;border-right:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Spoken Tutorials are a part of the Talk to a Teacher project,coordinated by www.spoken-tutorial.org, supported by the National Mission on Education through ICT, MHRD, Government of India.  More information on the same is available at the following link [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro]. The script for this tutorial has been contributed by Abhishek Srivastav from SASTRA University and myself.  This is Anurag Jain from SASTRA University Thanjavur,  signing off. Thank you for watching.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Gyan</name></author>	</entry>

	</feed>