Just another WordPress.com weblog

PHP Beginners Guide

What is PHP?
PHP stands for Hypertext PreProcessor. It is a server-side scripting language. The PHP code can be mixed in with regular HTML tags and parsed on the server. PHP first showed up in the form of a set of Perl scripts that the creator, Rasmus Lerdorf, used to manage his online resume. Later, it was adapted by Andi Gutmans and Zeev Suraski in 1997 to use a C-written compiler. It was an entire remake of Lerdorf’s that turned PHP into the web language we know today.

Above is simple definition what I found on the web….

What to do to run your first Script?

Here you have to install the softwares like php, apache and mysql to work with php however its an difficult task for a newbie to install and configure them all to work and possibly you will drop the idea to learn PHP like me at first attempt.

The best way setup php in your system is to install any LAMP(Linux, Apache, MySQL,PHP ) stack.

I recommend you should install XAMPP for windows..

you can download it from xampp for windows for free….

It will install all the necessary software and configure them. For the future reference purpose I advice to install it any other drive then windows drive.

After installation XAMMP it comes with the XAMPP control panel there you need to start the Apache and MySQL.

When your control panel shows Apache and MySQL as running then you all set to go for your script.

Write https://localhost in your browser and select the language then welcome screen will come that shows you are all setup to start.

PHP Editor

like every programming language have to write code in an editor.

Here we can use notepad, dreamweaver, NuSphere etc. I like NuSphere however its not a free software but it is dedicated editor of PHP.

So at first not to worry if you don’t have any special editor, open notepad and start writing….

<?php
Print “Hello, World!”;
?>

That’s all save it as hello.php in your xampp installation folder inside the htdocs folder.

How to run this?

open your browser and type “http://localhost/hello.php&#8221; make sure that you had apache and MySQL are running.

If you get the “Hello, World” printed on the page then Congrats…

You had written your first program in PHP.

Thanks for reading  I will come up with some more basics soon…

Hello world!

Welcome to my Blog,

This is Lakhan Dewangan.

I am  Software Developer basically  in PHP and .NET.

Here You will find articles, tutorials and code snippets.

I will try to focus on the basic things that needs to implement in any web application plus some more interesting things that I faced while development.

Thanks for visiting my blog.

Tag Cloud

Follow

Get every new post delivered to your Inbox.