There are two ways to use Php -
First method:
Download and install 1 php from their website www.php.net
2 download and install a database software oracle or mysql to store data
3 Use the command prompt to run php code.
Note : - The use of this method is very less, so we are not giving more information about it.
Second method:
Download AMP (Apache, MySQL, PHP) software to learn php
1 Apache: - apache runs by interpreting the code of php it works like a web server
2 MySQL: - stores MySQL data, it works like a database server
AMP is available for all operating systems
like :-
WAMP (Windows , Apache, MySQL, PHP)
LAMP (Linux , Apache, MySQL, PHP)
MAMP (Mac , Apache, MySQL, PHP)
SAMP (Solaris , Apache, MySQL, PHP)
XAMPP (Cross , Apache , MySQL , PHP, Perl)
You can use XAMPP in all operating systems, download it or install and install the AMP (Apache, MySQL, PHP) software, recommended by your operating system.
The computer's web browser cannot run php language, it can only run the front end language used in web development and Php is a server side programming language. Its code runs in the server web hosting for learning php language ( server) There is no need to purchase, instead of web server, use local server to learn php.
Using wamp server here
Install wamp after downloading it from their website www.wampserver.com/en
It c drive in the install is done
After installing, the c drive à wamp 64 à www folder will appear inside the c drive, inside this www folder, php file is kept.
create first php file
Write the code given below with the help of any code editor
example 1
file name : example.php
<?php echo "php example"; ?> |
The file on C Drive À Wamp 64 À Www the folder in a file name with the .php extension with to save
Like here, this file is saved as example.php.
To run 1 Php file, first of all double click on the icon of the wamp server and start (run).
2 To run this php file, open the browser and type
localhost/example.php
Output
Php is the server side scripting language, interpreter its code in the run server, cannot currently place the web page or website in the server because it is not free for this, hosting and domain name have to be
AMP (Apache MySQL PHP) software is used to test php code and run the code. This software provides work and facility like a server. It runs in our own computer or laptop. From this, php can learn AMP server computer It runs so it is called local server.