PHP introduction

Programming languages or concepts

PHP introduction :-

 PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.

PHP 7 is the latest stable release.

PHP code is executed on the server.


Why should we use PHP?


PHP can actually do anything related to server-side scripting or more popularly known as the backend of a website. For example, PHP can receive data from forms, generate dynamic page content, can work with databases, create sessions, send and receive cookies, send emails etc. There are also many hash functions available in PHP to encrypt user’s data that makes PHP secure and reliable to be used as a server-side scripting language. So these are some of the abilities of PHP that makes it suitable to be used as server-side scripting language. You will get to know more of these abilities in further tutorials.


Even if you are not convinced by the above abilities of PHP, there are some more features of PHP. PHP can run on all major operating systems like Windows, Linux, Unix, Mac OS X etc. Almost all of the major servers available today like Apache supports PHP. PHP allows using wide range of databases. And the most important factor is that it is free to use and download and anyone can download PHP from its official source : www.php.net.


What is a PHP file ?

      PHP files can contain text ,HTML, CSS ,JavaScript and PHP code.

     PHP code is executed on the server and the result is returned to the browser as plan HTML.

     PHP file have extension ".PHP".


What Can PHP Do?

PHP can generate dynamic page content

PHP can create, open, read, write, delete, 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 be used to control user-access

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 various platforms (Windows, Linux, Unix, Mac OS X, etc.)

PHP is compatible with almost all servers used today (Apache, IIS, etc.)

PHP supports 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


   Basic PHP Syntax:

   A PHP script can be placed anywhere in the document.

   PHP script start with <? PHP and ends with?>;

   <? PHP 

       //PHP code

      ?>


 The default file extension for PHP files is       ".PHP".

  A PHP file normally contain HTML tags and more PHP script in code.




Tags:
close