0% found this document useful (0 votes)
17 views3 pages

Working of PHP Scripts

PHP is an open-source server scripting language designed for creating static and dynamic web pages, as well as web applications. It is compatible with various databases and platforms, making it versatile for web development. PHP is easy to learn for beginners and has a strong online community for support.

Uploaded by

Jatin 1071
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views3 pages

Working of PHP Scripts

PHP is an open-source server scripting language designed for creating static and dynamic web pages, as well as web applications. It is compatible with various databases and platforms, making it versatile for web development. PHP is easy to learn for beginners and has a strong online community for support.

Uploaded by

Jatin 1071
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

What is PHP?

We can say that PHP is an open source programming and server scripting language that is particularly
well adapted to Create Static web pages or Dynamic web pages or may be Web applications and can
be includes in HTML codes. It’s used to handle complex content, databases, and session logging, as
well as to create entire e-commerce websites. PHP is generally known as Hypertext preprocessor but
it was first known as Personal Home Page. It was Designed in 1994 by the programmer named
Rasmus Lerdorf. PHP would be relatively simple to learn but you have a clear knowledge of HTML
first. PHP is compatible with a variety of databases, including MySQL, PostgreSQL, Oracle, Sybase,
Informix, and Microsoft SQL Server, and can communicate with other services through protocols
including LDAP, POP3, HTTP, IMAP, and COM. And, PHP operates on a variety of platforms, including
Windows, Linux, Unix, and Mac OS X,etc.

Here is some Example of PHP Code!

<!DOCTYPE html>

<html>

<body>

<?php

Echo “My first PHP script!”;

?>

</body>

</html>

What are the Uses of PHP?

The great thing about PHP is that it is incredibly basic for a beginner while still including a wealth of
sophisticated features for a seasoned programmer. Don’t be intimidated by the long list of PHP’s
capabilities. You should hop right in and begin writing basic scripts in a matter of hours.

• PHP executes system operations, such as creating, opening, reading, writing, and closing files
on a system.
• PHP can manage formats, which means it can collect data from databases, save data to a file,
send data by email, and return data to the user.
• PHP allows you to add, erase, and change items in your database.
• PHP’s core area is server-side scripting. If you want to practise at home as an amateur, this is
the way to go.
• Scripting from the command line is ideal for crone or Task Scheduler scripts. It’s also useful
for basic text editing.
• To communicate with every back-end / database server, such as MySQL.
• You will use PHP to find today’s date and then create a monthly calendar.
• PHP is commonly used to generate HTML code for web browsers.
• If you have banner ads on your website, PHP can be used to rotate them randomly.
• You may use php to limit a user’s access to a single web page.
• You can build a login page for your user using PHP.
• Connects a web browser to a database.

So these are the uses of PHP, But, you didn’t know why we use PHP Language, let me explain you in
following:

Why we use PHP Language?

You’ve already heard of a few different programming languages, and you’re probably curious why we
choose PHP as our poison for web programming. Because PHP has excellent online documentation
and a solid function structure. As a result, the language is relatively simple to learn and has a large
online community. There are a plethora of forums and guides on different PHP approaches and
issues, so you should have no trouble finding assistance if you need it. Here are some basic point.

• It operates on a variety of platforms, including Windows, Linux, and Unix.


• It works for a variety of databases, including MySQL, Oracle, and PostgreSQL.
• PHP is an open source programming language that is available to anyone for free.
• When opposed to other languages such as JSP, ASP, and others, the learning curve is
relatively short.
• This language is simple to pick up and use, and it performs well on the server side.
• It’s ideal for Web creation because it can be inserted right into the HTML code.

On different operating systems, it is often used in conjunction with Apache (the application server).
It’s also compatible with Microsoft’s IIS on Windows.

PHP can be used to make interactive web sites as well.

Another advantage of PHP is that it is a server-side scripting language, which means that you only
need to instal it on the server and that client computers requiring services from the server do not
require PHP; just using a web browser is sufficient.

How PHP works?

The PHP programme interacts with the site server, which is the programme that sends out web pages
to the rest of the world. When you type a URL into the address bar of your web browser, you’re
telling the web server at that URL to email you an HTML file. The requested file is sent by the web
server in response. The HTML file is read by your browser, and then shows the web page. When you
press a source on a web page, you’re also requesting a file from the web server. Additionally, when
you press a web page button that submits a form, the web server processes a file. When PHP is
mounted, the procedure is exactly the same. You submit a file, and the web server, which happens to
be running PHP, responds with HTML, because of PHP it all happens. You can under stand this
through these steps:-
Step 1 – Client send a page request to the web server.

Step 2 – Web server forwards that request to the PHP interpreter.

Step 3 – Now PHP interpreter will take the Date from Database and responce it back to the Web
server.

Step 4 – At last Web server responce To the client who has asked for the page

You might also like