Training Documentations

114
Learning Plan for Fresher Day 01 PHP Basics 1. Syntax Syntax - The rules that must be followed to write properly structured code. PHP's syntax and semantics are similar to most other programming languages (C, Java, Perl) with the addition that all PHP code is contained with a tag, of sorts. All PHP code must be contained within the following... PHP Code: <?php ?> or the shorthand PHP tag that requires shorthand support to be enabled on your server... <? ?> If you are writing PHP scripts and plan on distributing them, we suggest that you use the standard form (which includes the ?php) rather than the shorthand form. This will ensure that your scripts will work, even when running on other servers with different settings. How to Save Your PHP Pages If you have PHP inserted into your HTML and want the web browser to interpret it correctly, then you must save the file with a .php extension, instead of the standard .html extension. So be sure to check that you are saving your files correctly. Instead of index.html, it should be index.php if there is PHP code in the file. Example Simple HTML & PHP Page Below is an example of one of the easiest PHP and HTML page that you can create and still follow web standards. PHP and HTML Code:

description

t

Transcript of Training Documentations

Learning Plan for FresherDay 01PHP Basics1. SyntaxSyntax - The rules that must be folloe! to rite "ro"erly structure! co!e.PHP's syntax and semantics are similar to most other programming languages (C, Java, Perl) with the addition that all PHP code is contained with a tag, of sorts. ll PHP code must !e contained within the following...PHP #o!e$

or the shorthand PHP tag that requires shorthand support to be enabledon your server...

"f you are writing PHP scripts and plan on distri!uting them, we suggest that you use the standard form (which includes the #php) rather than the shorthand form. $his will ensure that your scripts will wor%, even when running on other servers with different settings.How to Save Your PHP Pages"f you have PHP inserted into your H$&' and want the we! !rowser to interpret it correctly, then you mustsave the file with a .php extension, instead of the standard .html extension. (o !e sure to chec% that you are saving your files correctly. "nstead of index.html, it should !e index.php if there is PHP code in the file. Example Simple HTML & PHP Page)elow is an example of one of the easiest PHP and H$&' page that you can create and still follow we! standards.PHP an! HT%L #o!e$

My First PHP Page