How to install and setup PHP?

 

What Do I Need?

To start using PHP, you can:

  • Find a web host with PHP and MySQL support
  • Install a web server on your own PC, and then install PHP and MySQL

Use a Web Host With PHP Support

You can simply download Xampp or Wampp Server on your PC.
Just Search "Download Xampp for windows 7" (Or whatever your OS windows 7, Windows 10 etc).
Click any site on google and download xampp server.
Install it and setup. You can setup Xampp by finding any Video on Youtube.


First program in PHP

After successful installation of Xampp Server on your PC, Go to C://Xampp/htdocs

Create here any folder and then create a new file with .php extention.

For example crate a folder named 'TEST' and then enter to this folder.

Test create a file 'test.php' with the code written below:

<?php
$txt = "PHP";
echo "I love $txt!";
?>

Now go to your browser and open your file with localhost/YourFfolderName/YourFileName.php

For Example localhost/test/test.php

Comments

Popular posts from this blog

PHP Variables

PHP Comments

PHP Operators