Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design
Synopsis:

Lesson 1: introduces the PHP basics outlining PHP strengths, weaknesses and also where to get PHP.

Contents

  1. What PHP is
  2. Where to get PHP
  3. The merits and demerits of PHP  
  4. How to Escape PHP from HTML
  5. How to use the print() statement to produce output
  6. Escaping special characters in PHP
  7. How to use the echo() statement to produce output
  8. The life-saving <<<Here document

What is PHP?

PHP is a server-side HTML Preprocessor that is HTML-embedded. Under normal cirumstances, your web browser sends GET instructions to the web server which then coughs up a web page in "plain HTML" for your browser to display. This is the normal setting!

PHP changes things a little bit. When your browser makes a GET request for a PHP document, instead of the server just coughing up the page, it gives it up to the PHP pre-processor that does some magic with it and then gives it back to the server. The server then coughs (it actually vomits this time around) the page to you as though it were plain HTML. The server behaves as if nothing happenned and takes all the glory. Lying infidel!

Wait a minute! Just how did the server identify the file as a PHP document and not just a normal HTML file? PHP files are given a special file-extension (.php .phtml or .php3). That way the server knows NOT to touch them until they have been processed by PHP and converted into HTML. Smart Huh?!

Be informed though, the server administrator may decide to set up another method for the web server to identify PHP scripts other than the standard .php and .php3. Mmmm.

Where do I get PHP?

PHP is freeware under the GNU Open Licence Agreement. Both the source code and binaries have been ported to many platforms and are available for download at http://www.php.net . Installation will vary from operating system to operating system. Complete installation procedures are available with your download, or at http://www.php.net . There are several technical, configuration, security and performance considerations that you should especially read carefully.

Please note that PHP will have to be installed and ran at the server. If you do not have access to the server, then you can either download PHP, and then configure a server on your computer, or ask your web-server administrator to install PHP on the server. You CANNOT just copy the .php (or .php3) files to a normal server and hope for miracles! They do not come that easy!

 

PHP ecommerce web developer India flash website designer India seo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81