Define PHP and How to work?

Type of website:-

A static page is called that in which the information that is there is in the name of every user. You cannot change anything in a static page. It is only used to see information.

Dynamic website:-

Dynamic website is user-friendly, user can interact with it. The page in which the user can interact is called a dynamic website. Like submitting a form by filling in a web page. In this, each user gives different information, the user who enters the information gets the same result.

How PHP works?

There is a client who sends a request or works to visit a website.

web server

The webserver provides us this facility which will be there for 24 hours. So that your client will be able to send that request by any time difference and its corresponding web server will be able to respond to it. A server will run in the webserver which you call Apache server.

This is the web server, this is your small storage in which you have a database created. In which your own server is running which supports PHP. As a programmer, whatever site he has developed is the content of the whole site or is it accessories, They give way by storing them in their web server. You will also create a database so that the user can access it anytime.

client > apache> PHP> database> PHP> Apache> client

Development environment

Operating system – Windows, Linux, Mac, etc.

Web server – XAMP, WAMP, MAMP etc.

Editor/IDE- Notepad, Notepad++, notepad, brackets, eclipse etc.

Web browser – chrome, Firefox etc.

MySQL

MySQL ek database management system hai, is a kind of software in which you write MySQL. MySQL is a software and SQL is a language.

When you install XAMPP, you get:
Apache + MariaDB + PHP + Perl

Apache + MySQL + PHP + Perl

The basic structure of PHP

<?php   opening markup/ Opening tag

php codes;

?> closing markup/ closing tag

Whatever is written between these two is called php code.

We can write Php with HTML

<!DOCTYPE html>
<html>
	<body>
		<h1><body>DevOpsSchool</h1>
	<?php
		echo'hello devopsschool';
	?>
	
	</body>
</html>

How to run on the local server

If you have to run the PHP file in the local server, then first you have to open the XAMMP control panel, then you have to open apache and MySQL in it, this is the first thing. After that you have to go to this puck, then where you have saved the XAMMP file, you have to open the sump file, after that you have to open the htdos. After that you have to go to this PC, then open the file where you have saved XAMPP. After that htdcos has to be opened. Your project will have to create a file, all your files will be made from PHP, HTML, ccs, javascript, audio, images, videos, etc. Then go to your browser and open localhost, then type the name of your project in it and open it. After that, your PHP file will start running.

Tagged : / / / /
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x