Skip to main content

Posts

Showing posts from November, 2020

General Syntactic Characteristics of PHP | Keywords Used in PHP | Variables

General Syntactic Characteristics of PHP  | Keywords Used in PHP | Run First Program in PHP General Syntactic Characteristics: PHP code can be embedded in the XHTML document. The code must be enclosed with in <?php and > If the PHP script is stored in some another file and if it needs to be referred then include construct is used. For instance:  Include("myfile.inc") The Variable names in PHP begin with the $ sign. Following are some reserved keywords that are used in PHP. and Default false if or this break do For include require true case else foreach list return var class elseif function new static virtual continue extends global not switch while      

Installation of PHP

There are various methods of getting PHP installed on your machine.  FIRST METHOD:   The PHP requires the Apache Web server to execute its code. The Apache web server is an open source software and can be easily downloaded from the internet.  The site for getting the Apache web server is http://httpd.apache.org/download.cgi .  The PHP can be installed on you machine from the web site http://www.php.net .  SECOND METHOD:  Another Approach which is the most efficient way to install Apache, PHP, MYSQL on you machine is to use the packages like XAMPP (The X stands for any OS) or WAMPP (The W stands for windows OS). These packages support the Apache, PHP, MYSQL, PERL.  I have installed the XAMPP package . The Root directory can be accessed using the http://localhost/ Other Usefull Links: Introduction to PHP - Click Here   General Syntactic Characteristics of PHP -  Click Here Keywords Used in PHP - Click Here PHP Data Types - Click Here

Introduction to PHP

Orgins and Uses of PHP PHP was developed in 1994 by Apache group. PHP stands for PHP : Hypertext Preprocessor. PHP is a server-side scripting language. It is mainly used for form handling and database access. It is free to download and use. Overview of PHP The PHP processor works in two modes. If the PHP processor finds XHTML tags in the PHP script then the code is simply copied to the output file. But when the PHP processor finds the PHP code in the script then that code is simply interpreted and the output is copied to the output file. PHP is a server side scripting language embedded in XHTML. It is a alternative to CGI, ASP, ASP.NET and JSP. If you click for view source on the web browser you can never see the php script because the output of php script is send directly to the browser but you can see the XHTML tags. The Extension to the PHP files are .php, .php3 or .phtml. PHP has large number of library functions which makes it flexible to develop the code in php. PHP makes use of