PHP is a widely used open-source, general-purpose scripting language that is PHP code is embedded in HTML. Php is the most popular web development language in the world, developed by Rasmus Lerdorf in1995 using Perl and c technologies.
There are three main areas where PHP scripts are used.
- Server-side scripting. This is the most traditional and main target field for PHP. You need three things to make this work. The PHP parser (CGI or server module), a web server and a web browser. You need to run the web server, with a connected PHP installation. You can access the PHP program output with a web browser, viewing the PHP page through the server. All these can run on your home machine if you are just experimenting with PHP programming.
- Command line scripting. You can make a PHP script to run it without any server or browser. You only need the PHP parser to use it this way. This type of usage is ideal for scripts regularly executed using cron (on *nix or Linux) or Task Scheduler (on Windows). These scripts can also be used for simple text processing tasks.
Writing desktop applications. PHP is probably not the very best language to create a desktop application with a graphical user interface, but if you know PHP very well, and would like to use some advanced PHP features in your client-side applications you can also use PHP-GTK to write such programs. You also have the ability to write cross-platform applications this way. PHP-GTK is an extension to PHP, not available in the main distribution.
What is php can do
- Php is executed at server side and shows the result on the browser
- It can interact with any databases(example MySQL, Oracle, Sybase, MySQL etc.),
- can create sessions and cookies
- php syntax is borrowed from c & Perl
- we create images and can make image manipulation
- php can collect the form data and can send to the database
- PHP can add, delete, modify data in your database
- Php can work with XML
- It can support web services
- Php can support the number of protocols such as FTP, HTTP,https, LDAP, IMAP, POP3, NNTP, and DNS, among others
- It can generate secure web pages.
- Php can work with a file system and directories such as can read, write, delete, create files and also directories
- Php integrate with a wide array of credit-card processing solutions
- It can create and manipulate Adobe Flash and Portable Document Format (PDF) files.
- Moreover it can support pear, UDDI,curl and others
Features of php
- Php is open source
- It is fast
- Easy to use
- It is customizable
- Technical support is available
- Cross-platform or it is versatile
- Cross server
- Cross database
- Oops supports
- Php supports diff type of content management system software like Joomla, Drupal,etc
- Php provides MySQL library to connect with opensource, powerful MySQL database. Major databases currently supported by PHP are:
- PHP also has support for talking to other services using protocols such as LDAP, IMAP, SNMP, NNTP, POP3, HTTP, COM (on Windows) and countless others.
How to work with PHP file?
- save the php file with ".php" extension and place that saved php file in a server
- php file will execute on the server and the result is displayed on the browser
Some programming information about PHP
- php is case-sensitive
- php is whitespace insensitive
- statements are terminated by semicolon like c