History of PHP
PHP
|
|
Appeared in
|
|
Designed by
|
|
5.4.12 (February 21, 2013;
12 days ago)
|
|
Influenced by
|
|
Implementation language
|
|
Common extensions
.php Older, now uncommon extensions .phtml, .php4 .php3, .php5, .phps, .php6-beta. |
|
|
PHP is an open-source server-side scripting language
designed for Web development to
produce dynamic Web pages. It is one of the
first developed server-side scripting languages to be embedded into an HTML source document rather than calling an external file to process
data. The code is interpreted by a Web server
with a PHP processor module which generates the resulting Web page. It has also
evolved to include a command-line interface capability and
can be used in standalonegraphical
applications.[2] PHP can be deployed on most Web servers
and also as a standalone shell on almost every operating system and platform, free of charge.[3]PHP was a competitor to Microsoft's Active Server Pages(ASP) server-side
script engine[4] and similar languages, but
gradually received better acceptance and is now installed on more than 20
million Web sites and 1 millionWeb servers.[5]
PHP was originally created by Rasmus Lerdorf in
1995. The main implementation of PHP is now produced by The PHP Group and
serves as the formal reference to the PHP language.[6] PHP is free software released under the PHP License, which is incompatible with the GNU
General Public License (GPL) due to restrictions on the usage of the
term PHP.[7]
While PHP originally stood for Personal Home Page[8], it is now said
to stand for PHP: Hypertext Preprocessor,
arecursive acronym.[9]
The LAMP
architecture has become
popular in the Web industry as a way of deploying Web applications. PHP is
commonly used as the P in this bundle alongside Linux, Apache and MySQL, although the P may also refer to Python, Perl, or some mix of
the three. Similar packages are also available for Windows and OS X, then called WAMP and MAMP, with the first
letter standing for the respective operating system. Although both PHP and
Apache are provided as part of the Mac OS X base install, users of these
packages seek a simpler installation mechanism that can be more easily kept up
to date.
PHP Introduction
PHP code is executed on the server.
What You Should Already Know
Before you continue you should have a basic understanding of the
following:
- HTML
- JavaScript
What is PHP?
- PHP stands for PHP: Hypertext Preprocessor
- PHP is a
widely-used, open source scripting language
- PHP scripts are
executed on the server
- PHP is free to
download and use
|
PHP is simple for beginners.
PHP also offers many advanced features for professional programmers. |
What is a PHP File?
- PHP files can
contain text, HTML, JavaScript code, and PHP code
- PHP code are
executed on the server, and the result is returned to the browser as plain
HTML
- PHP files have
a default file extension of ".php"
What Can PHP Do?
- PHP can
generate dynamic page content
- PHP can create,
open, read, write, and close files on the server
- PHP can collect
form data
- PHP can send
and receive cookies
- PHP can add,
delete, modify data in your database
- PHP can
restrict users to access some pages on your website
- PHP can encrypt
data
With PHP you are not limited to output HTML. You can output
images, PDF files, and even Flash movies. You can also output any text, such as
XHTML and XML.
Why PHP?
- PHP runs on
different platforms (Windows, Linux, Unix, Mac OS X, etc.)
- PHP is
compatible with almost all servers used today (Apache, IIS, etc.)
- PHP has support
for a wide range of databases
- PHP is free.
Download it from the official PHP resource: www.php.net
- PHP is easy to
learn and runs efficiently on the server side
What is XAMPP / WAMP / MAMP
XAMPP/WAMP/MAMP – Single
Package Consisting of Apache,Mysql,PHP In order for a web application to be
Complete we need a database platform,A Server to execute server side Scripts
and to store our files.
Instead
of downloading this packages Separately and installing them individually these
are available in a Single Package.
Point
to Mention here is they are available free of Cost.
This
can be Downloaded Separately from
Apache: http://apache-http-server.en.softonic.com/
Mysql:
http://www.mysql.com/downloads/
1.
WAMP
o
WAMP
– Windows Apache MySql Php
o
Wamp
is for windows which includes the the Apache server Mysql and Php that for
optimised for the Microsoft Windows OS
o
Download
link for
WAMP: http://sourceforge.net/projects/wampserver/files/WampServer%202/WampServer%202.2/wampserver2.2c-x32.exe/download
2. MAMP
o
MAMP
-Mac Apache MySql Php
o
Mamp
is for Mac which includes the the Apache server Mysql and Php that for
optimised for the Macintosh OS
o
Download
link for MAMP: http://www.mamp.info/en/downloads/index.html
3.XAMPP
o
XAMPP
– X(Cross Platform) MySQl PHP Perl
o
XAMPP
is a cross platform package which runs on all Os such as
Mac,Windows,Solaris etc,it is not built for a particular platform and its size
is larger than the other two.
o
Additionally
it also runs the Perl Scripts which is a older Server Side Scripting Language
o
Download
link: http://xampp.en.softonic.com/download
Thank
u for reading this Article hope it was useful !
Installing and Testing
Wampserver
Hopefully, you have now downloaded and installed Wampserver. This will give
you a server on your own PC (Windows users), somewhere you can test your
scripts. If you haven't yet dowloaded the Wampserver software, you can download
it here:If the installation went well, you should have an new icon in the bottom right, where the clock is:
From here, you can stop the server, exit it, view help files, and see the configuration pages.
Click on localhost, though, and you'll see this page appear: (Localhost just refers to the server running on your own computer. Another way to refer to your server is by using the IP address 127.0.0.1.)
If you saw the above page, then congratulations! Your PHP server is up and running, and you can make a start scripting PHP pages.
Troubleshooting
If you don't see the info.php page, then you will need to refer to the
wampserver forums. The page you need is here:Hopefully, your question will already have been asked an answered. (Unfortunately, we can't answer questions about Wampserver, as it's not our software.)
Saving your PHP files
Whenever you create a new PHP page, you need to save it in your WWW
directory. You can see where this is by clicking its item on the menu:
c:/wamp/www/
Bear this in mind when you click File
> Save As to save your PHP
scripts.
Launching your PHP scripts
Suppose you have created a php script called test1.php. To launch this
script, you need to add the script name after localhost in your browser. So
instead of this:
http://localhost/index.php
You would type this:
http://localhost/test1.php
You don't type the name of the wamp folder, however. This would be wrong,
for example:
c:/wamp/www/test1.php
As too would this:
http://localhost/www/test1.php
Your server knows where the www folder is, so you don't have to type it out:
just add the script name tolocalhost. Likewise, if you create a folder
under www then you'd just type this:
http://localhost/folder_name/script_name.php
OK, we'll assume that everything is now up and running. If it's not, click "Move on to the Next Part" below, for some troubleshooting. If it is, click "Back to the PHP Contents Page".
No comments:
Post a Comment