HYPERTEXT PRE-PROCESSOR (PHP)
UNIT-I
1.1 INTRODUCTION TO PHP
Hypertext Preprocessor. PHP is a server-side scripting language designed
specifically for web development.
It is open-source which means it is free to download and use. It is very simple to
learn and use. The files have the extension “.php”.
Rasmus Lerdorf inspired the first version of PHP and participated in the later
versions. It is an interpreted language and it does not require a compiler.
PHP code is executed in the server.
It can be integrated with many databases such as Oracle, Microsoft SQL Server,
MySQL, PostgreSQL, Sybase, and Informix.
It supports main protocols like HTTP Basic, HTTP Digest, IMAP, FTP, and others.
Websites like www.facebook.com and www.yahoo.com are also built on PHP.
One of the main reasons behind this is that PHP can be easily embedded in HTML
files and HTML codes can also be written in a PHP file.
Syntax:
<?php
PHP code goes here
?>
What is PHP
PHP is an open-source, interpreted, and object-oriented scripting language that
can be executed at the server side.
PHP is well suited for web development. Therefore, it is used to develop web
applications (an application that executes on the server and generates the dynamic
page.).
PHP was created by Rasmus Lerdorf in 1994 but appeared in the market in
1995. PHP 7.4.0 is the latest version of PHP, which was released on 28
November. Some important points need to be noticed about PHP are as follows:
,What is the Internet?
The Internet is essentially a global network of computing resources. You can think of
the Internet as a physical collection of routers and circuits as a set of shared resources.
A network of networks based on the TCP/IP communications protocol.
A community of people who use and develop those networks.
Internet-Based Services
Some of the basic services available to Internet users are −
Email − A fast, easy, and inexpensive way to communicate with other Internet
users around the world.
Telnet − Allows a user to log into a remote computer as though it were a local
system.
FTP − Allows a user to transfer virtually every kind of file that can be stored on
a computer from one Internet-connected computer to another.
UseNet news − A distributed bulletin board that offers a combination news and
discussion service on thousands of topics.
World Wide Web (WWW) − A hypertext interface to Internet information
resources.
What is WWW?
WWW stands for World Wide Web. A technical definition of the World Wide
Web is − All the resources and users on the Internet that are using the Hypertext
Transfer Protocol (HTTP).
A broader definition comes from the organization that Web inventor Tim Berners-
Lee helped found, the World Wide Web Consortium (W3C): The World Wide
Web is the universe of network-accessible information, an embodiment of human
knowledge.
In simple terms, The World Wide Web is a way of exchanging information
between computers on the Internet, tying them together into a vast collection of
interactive multimedia resources.
What is HTTP?
HTTP stands for Hypertext Transfer Protocol. This is the protocol being used to transfer
hypertext documents that make the World Wide Web possible.
,A standard web address such as Yahoo.com is called a URL and here the
prefix HTTP indicates its protocol
What is a URL?
URL stands for Uniform Resource Locator and is used to specify addresses on the
World Wide Web.
A URL is the fundamental network identification for any resource connected to
the web (e.g., hypertext pages, images, and sound files).
A URL will have the following format −
(protocol://hostname/other_information)
The protocol specifies how information is transferred from a link. The protocol
used for web resources is Hypertext Transfer Protocol (HTTP). Other protocols
compatible with most web browsers include FTP, telnet, newsgroups, and Gopher.
The protocol is followed by a colon, two slashes, and then the domain name. The
domain name is the computer on which the resource is located.
Links to particular files or subdirectories may be further specified after the domain
name. The directory names are separated by single forward slashes.
What is a Website?
Currently, you are on our website Tutorialspoint.com which is a collection of
various pages written in HTML markup language.
This is a location on the web where people can find tutorials on the latest
technologies. Similarly, there are millions of websites available on the web.
Each page available on the website is called a web page and first page of any
website is called home page for that site.
, What is Web Server?
Every Website sits on a computer known as a Web server.
This server is always connected to the internet. Every Web server that is connected
to the Internet is given a unique address made up of a series of four numbers
between 0 and 256 separated by periods.
For example, 68.178.157.132 or 68.122.35.127.
When you register a Web address, also known as a domain name, such as
tutorialspoint.com you have to specify the IP address of the Web server that will
host the site.
What is a Web Browser?
Web Browsers are software installed on your PC. To access the Web you need a
web browser, such as Netscape Navigator, Microsoft Internet Explorer, or Mozilla
Firefox.
Currently, you must be using any sort of Web browser while you are navigating
through my site tutorialspoint.com.
On the Web, when you navigate through pages of information this is commonly
known as browsing or surfing.
What is a Dynamic Website?
A website can be static or dynamic. A static website's information does not change
automatically, which means it remains static or the same for all visitors of the site.
A dynamic website or webpage has information, which is generated in real-time
and altered on the basis of the viewer, the time zone, time of the day, and other
aspects.
For example, the Javatpoint website's home page changes daily to provide visitors
latest content as it is a dynamic web page.
However, this page that you are visiting currently, its information will not be
changed until it is not updated as it is a static page.
SCOPE OF PHP
PHP has a lot of scope now and forever.
This is something studied and reported by many top PHP Training Institutes in
Chennai Companies prefer PHP as it creates more efficient and dynamic web
solutions.
A website is the ultimate doorway for any organization that is in the IT sector.
This is why there is high demand for PHP developers.
It is a simple yet powerful tool to start a website for any individual or company
purpose. PHP web development program is an open-source scripting language that
is fast and is widely used to develop a wide variety of web and internet
applications.
UNIT-I
1.1 INTRODUCTION TO PHP
Hypertext Preprocessor. PHP is a server-side scripting language designed
specifically for web development.
It is open-source which means it is free to download and use. It is very simple to
learn and use. The files have the extension “.php”.
Rasmus Lerdorf inspired the first version of PHP and participated in the later
versions. It is an interpreted language and it does not require a compiler.
PHP code is executed in the server.
It can be integrated with many databases such as Oracle, Microsoft SQL Server,
MySQL, PostgreSQL, Sybase, and Informix.
It supports main protocols like HTTP Basic, HTTP Digest, IMAP, FTP, and others.
Websites like www.facebook.com and www.yahoo.com are also built on PHP.
One of the main reasons behind this is that PHP can be easily embedded in HTML
files and HTML codes can also be written in a PHP file.
Syntax:
<?php
PHP code goes here
?>
What is PHP
PHP is an open-source, interpreted, and object-oriented scripting language that
can be executed at the server side.
PHP is well suited for web development. Therefore, it is used to develop web
applications (an application that executes on the server and generates the dynamic
page.).
PHP was created by Rasmus Lerdorf in 1994 but appeared in the market in
1995. PHP 7.4.0 is the latest version of PHP, which was released on 28
November. Some important points need to be noticed about PHP are as follows:
,What is the Internet?
The Internet is essentially a global network of computing resources. You can think of
the Internet as a physical collection of routers and circuits as a set of shared resources.
A network of networks based on the TCP/IP communications protocol.
A community of people who use and develop those networks.
Internet-Based Services
Some of the basic services available to Internet users are −
Email − A fast, easy, and inexpensive way to communicate with other Internet
users around the world.
Telnet − Allows a user to log into a remote computer as though it were a local
system.
FTP − Allows a user to transfer virtually every kind of file that can be stored on
a computer from one Internet-connected computer to another.
UseNet news − A distributed bulletin board that offers a combination news and
discussion service on thousands of topics.
World Wide Web (WWW) − A hypertext interface to Internet information
resources.
What is WWW?
WWW stands for World Wide Web. A technical definition of the World Wide
Web is − All the resources and users on the Internet that are using the Hypertext
Transfer Protocol (HTTP).
A broader definition comes from the organization that Web inventor Tim Berners-
Lee helped found, the World Wide Web Consortium (W3C): The World Wide
Web is the universe of network-accessible information, an embodiment of human
knowledge.
In simple terms, The World Wide Web is a way of exchanging information
between computers on the Internet, tying them together into a vast collection of
interactive multimedia resources.
What is HTTP?
HTTP stands for Hypertext Transfer Protocol. This is the protocol being used to transfer
hypertext documents that make the World Wide Web possible.
,A standard web address such as Yahoo.com is called a URL and here the
prefix HTTP indicates its protocol
What is a URL?
URL stands for Uniform Resource Locator and is used to specify addresses on the
World Wide Web.
A URL is the fundamental network identification for any resource connected to
the web (e.g., hypertext pages, images, and sound files).
A URL will have the following format −
(protocol://hostname/other_information)
The protocol specifies how information is transferred from a link. The protocol
used for web resources is Hypertext Transfer Protocol (HTTP). Other protocols
compatible with most web browsers include FTP, telnet, newsgroups, and Gopher.
The protocol is followed by a colon, two slashes, and then the domain name. The
domain name is the computer on which the resource is located.
Links to particular files or subdirectories may be further specified after the domain
name. The directory names are separated by single forward slashes.
What is a Website?
Currently, you are on our website Tutorialspoint.com which is a collection of
various pages written in HTML markup language.
This is a location on the web where people can find tutorials on the latest
technologies. Similarly, there are millions of websites available on the web.
Each page available on the website is called a web page and first page of any
website is called home page for that site.
, What is Web Server?
Every Website sits on a computer known as a Web server.
This server is always connected to the internet. Every Web server that is connected
to the Internet is given a unique address made up of a series of four numbers
between 0 and 256 separated by periods.
For example, 68.178.157.132 or 68.122.35.127.
When you register a Web address, also known as a domain name, such as
tutorialspoint.com you have to specify the IP address of the Web server that will
host the site.
What is a Web Browser?
Web Browsers are software installed on your PC. To access the Web you need a
web browser, such as Netscape Navigator, Microsoft Internet Explorer, or Mozilla
Firefox.
Currently, you must be using any sort of Web browser while you are navigating
through my site tutorialspoint.com.
On the Web, when you navigate through pages of information this is commonly
known as browsing or surfing.
What is a Dynamic Website?
A website can be static or dynamic. A static website's information does not change
automatically, which means it remains static or the same for all visitors of the site.
A dynamic website or webpage has information, which is generated in real-time
and altered on the basis of the viewer, the time zone, time of the day, and other
aspects.
For example, the Javatpoint website's home page changes daily to provide visitors
latest content as it is a dynamic web page.
However, this page that you are visiting currently, its information will not be
changed until it is not updated as it is a static page.
SCOPE OF PHP
PHP has a lot of scope now and forever.
This is something studied and reported by many top PHP Training Institutes in
Chennai Companies prefer PHP as it creates more efficient and dynamic web
solutions.
A website is the ultimate doorway for any organization that is in the IT sector.
This is why there is high demand for PHP developers.
It is a simple yet powerful tool to start a website for any individual or company
purpose. PHP web development program is an open-source scripting language that
is fast and is widely used to develop a wide variety of web and internet
applications.