What is PHP?
We talk a lot about Web 2.0 technologies with our clients, but we rarely speak to the specific and complex technical aspects of our work. Of course, most people care and want to know that their information is secure and professionally presented, but not often enough do we get to experience the joy of explaining in painstaking detail the exact nature of computer protocol and web design.
<?PHP ?>
PHP is a hypertext preprocessor, meaning that its function is to produce something functional; in this case HTML, the markup language that web browsers understand. This allows dynamic information to be reached or calculated and then translated into something a browser understands in real time. Without this capability, websites would be very static, non-interactive, and incapable of providing unique experiences for each viewer. Imagine a world without web-based client logins, bill-pay, or online forums like Facebook and Twitter.
Order Of Events
PHP is a scripting language that is hosted on a server and is executed by the server stack when a website is accessed.

PHP can grab information stored in databases, talk to other computers and programs, and execute its own internal mathematical and logical functions in real time and produce the HTML website you see on your screen. In fact, this page you’re viewing now was highly preprocessed using PHP the moment you visited the page!
PHPrimer
A standard static webpage has the form:

On a web server, a preprocessed web page looks more like:

where $data may refer to information from a database or even a function that adds numbers together. Static HTML is incapable of this functionality. Most importantly, a user’s web browser only sees the result of the executed function. For example, if $data was a function that calculated the number of city residents that ordered a particular meal from a certain restaurant, then the browser would only see:

A simple diagram and a simple example, but a powerful tool in the web arsenal.



11. Jan, 2010 








Author










No comments yet... Be the first to leave a reply!