This tutorial all about how to run your first php code in xampp. To start with this tutorial make sure you have already installed xampp one of your drive. After install xampp there will be a shortcut icon on desktop for xampp control panel. if don't get further i'll describe how get this icon. After installation you can see a 'xampp' named directory in your drive or defined location. Now second confirm apache and mysql is running in the xampp control panel. For example if you installed the xampp in D drive you can see 'D:\xampp' sometime by mistake beginners create a directory 'xampp' in drive D before installation. So it looks like 'D:\xampp\xampp'. Here in this directory you can get your 'xampp control' icon as well. So double check where the exactly xampp installed. After open the 'xampp' folder you see list of folder and files now need to open the directory 'htdocs'. In the 'htdocs' you can create a new directory like i am creating 'firstproject'. It will look like: 'D:\xampp\htdocs '
Xampp Control: Here click on 'xampp control' icon to open the panel.
Running Xampp Control:
Directory path.
D:\xampp\htdocs
No time to create a Pph file in the 'firstproject' folder. Create a file name 'new.php' it this directory. We will simple write the php string write script. To write php script we need to user php block '<?php ?>' within it we can write our php script. Here is the code we are going to use in the php file.
<?php
echo "This is simple php script to write string.";
?>
No to see the output we need to type the address 'http://localhost/firatproject/new.php' and we can see the output.
To following these simple steps you can start running your first php script. It is very useful steps to beginners to start with php and xampp server. Xampp X represent Cross platform, A represent Apache web server, M represent MySQL database, P represent PHP and last P represent PEARL packages. So it is a full web serve package.
Xampp Control: Here click on 'xampp control' icon to open the panel.
Running Xampp Control:
Directory path.
D:\xampp\htdocs
No time to create a Pph file in the 'firstproject' folder. Create a file name 'new.php' it this directory. We will simple write the php string write script. To write php script we need to user php block '<?php ?>' within it we can write our php script. Here is the code we are going to use in the php file.
<?php
echo "This is simple php script to write string.";
?>
No to see the output we need to type the address 'http://localhost/firatproject/new.php' and we can see the output.
To following these simple steps you can start running your first php script. It is very useful steps to beginners to start with php and xampp server. Xampp X represent Cross platform, A represent Apache web server, M represent MySQL database, P represent PHP and last P represent PEARL packages. So it is a full web serve package.