|
|
||||
| Saturday, July 31, 2010 |
![]() PHP Files, Syntax, and Coding Basics...
|
|||
![]() ![]() ![]() ![]() ![]() |
![]() |
|||
![]() |
![]() |
|||
|
PHP Files, Syntax, and Coding Basics... Introduction to PHP and Dynamic Websites... Learn how to configure Apache, PHP, MySQL & PHPMyAdmin... |
Introduction to PHP and Dynamic Websites:It's time to face it: The sun is setting on the age of static websites. Users have come to expect sites that are updated frequently, sites that allow them to purchase products online, and sites that make them feel like they're in control. With the huge increase in e-Commerce and internet useage, HTML can't do the job on it's own anymore.So Why PHP?
What is PHP?According to the PHP website - www.php.net - PHP is "a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML."Quite a mouthful, eh? Let's break it down: "PHP is a widely-used general purpose scripting language..." This means that PHP is a server-side language which, unlike JavaScript or HTML, is parsed by the server before being delivered to the browser. The diagram below will help you better understand how a PHP script works.
In the diagram above a user requests a page (for example, www.yoursite.com/index.php). The request is sent to the server where the PHP code is parsed. The final step is to send it back to the browser as plain HTML. "...that is especially suited for Web development..." This next part is rather self-explanatory. It means that PHP was especially designed to create web applications, which is good news for us! "...and can be embedded into HTML." The last part might sound a bit confusing at first. What it means is that PHP code can be interspersed within HTML code, like this: Example 1.1:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>PHP code can be embedded within HTML code!</title> </head> <body> <?php // PHP code ?> </body> </html> This feature makes it very easy for new programmers to develop their scripts and add them to pre-existing sites and templates. The Power of PHPMany people underestimate the sheer magnitude of applications that can be built using PHP. Here are just a few that I have created:
|
|||
| Copyright 2007 Bicubica™. All Rights Reserved. | ||||