What is PHP?
PHP stands for Hypertext Preprocessor and is a server-side scripting language for web development. Means that server-side code runs on the PHP web server and the result is an HTML page that is sent in your browser. Script does not mean that it needs to be compiled to run its code. PHP can be embedded in HTML.
PHP can create websites and web applications are really impressed, and today is the de facto standard used because in 70% web servers worldwide. You can easily learn PHP if you're familiar with the programming language such as C.
What you need to run PHP on your computer?
1. web server(Apache, IIS, and so on.)
2. PHP (http://www.php.net/downloads.php)
3. MySQL (http://www.mysql.com/downloads/)
You can install these 3 software one by one, or a single software package that will automatically install all your life easier and management, such as:
For Windows – WAMP, XAMPP, EasyPHP, AMPPS
For Mac – XAMPP, MAMP
For Linux – XAMPP
XAMPP
As for me, I use XAMPP I want to introduce you to this article. XAMPP can be installed and run on all major operating systems.
Installation
- Go through this home page of XAMPP link.
- Choose your operating system
- Download and run the installer
This is all. Now you're ready to write your site in PHP.
RUN YOUR SERVER
Run your XAMPP panel via the link from the desktop or start menu if you are on windows.

If you have not done your Apache, Click the check and run it as you can see in the screenshot.
Open your browser and go at http://localhost / and choose your language, As you can see from the screenshot.

Congratulations: you have successfully installed XAMPP on your system!
We write in PHP
As per tradition, each time you start to learn a new programming language, the first program you wrote is the phrase Hello World.
Let's do it ourselves, open a text editor and write:

Save the file hello.php in C:\xampphtdocs . Open your browser and go at http://localhost/hello.php e come per magia vedrai “Hello World!"On your browser.
How It Works?
As you have seen above, our code is located between ? , this to make it clear to the server that those lines are PHP. The coding can be done in PHP 3 forms as follows. You can use one of the options.

Insert PHP code into HTML
As you know, we are creating a website then you need to insert PHP code inside the’ HTML, as follows.

If you have questions or suggestions please do not hesitate to contact me.
Recent Comments