On Jan 15, 2012, at 3:55 PM, Rick Lecoat wrote:
> ... As somebody who is completely unversed in PHP, however, I was having a 
> hard time figuring out how all the pieces fit together. Do they end up as one 
> PHP file? or as a collection of PHP files that call each other? And how does 
> the connect with the HTML markup? 
> --
> Rick Lecoat


I often use the following analogy for my students (I teach web languages at my 
local college). 

A web site is like a house. You have the foundation, framing, rafters, and 
general construction which can be viewed as HTML -- it's the glue that holds 
everything together. You have wall paint (color), flooring (carpets/wood), 
siding (vinyl/brick), and roof (shingles/steel) which can be viewed as CSS -- 
it's the way the house looks. The house also provides water, electricity, and 
heat/cooling to the user -- that's the functionality which PHP provides. The 
house also has behavior in that you can turn on/off the lights, water, furnace, 
air conditioning, and open/close windows and doors -- that's Javascript. And 
then lastly, you need a place to store all the paperwork such as bills, 
insurance papers, and deed  -- that's MySQL. Put all those elements together 
properly and you'll create a fully functional web site.

With respect to PHP, it is a server-side language that delivers to the Browser 
data that the Browser in turn parses and presents the resultant web page to the 
user. Much of this is done via HTML, which can be provided by PHP. In fact, PHP 
can provide/create all the web languages provided to the Browser -- this 
includes HTML, CSS, JavaScript, data, as well as access to MySQL. PHP is a very 
powerful language.

As for all the PHP files ending up as one file, no. But all the scripts (in 
whatever language) contribute their offerings to the Browser which in turn 
renders the web page. A truly functional web site is far more than a static web 




List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org

Reply via email to