“PHP is a widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages. For this purpose PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document.”
– PHP @ Wikipedia
Basic Principles of PHP
- PHP is a server-side programming language: it runs on a web server.
- PHP pages typically contain a mix of HTML and PHP code.
- When a web server receives a request for a PHP page, the server first processes any PHP code in the page.
- The PHP code may generate text output, including HTML tags — this technique is sometimes known as dynamic content
- The combined results — static HTML, and dynamic content generated by PHP — is sent back to the user
- To the user, all content looks like static HTML: dynamic content is indistinguishable from static content
- The user will never see PHP code: PHP code never appears in the browser — PHP runs on the server, and if the PHP generates dynamic content, the user sees that content, but never the PHP code itself
Uses for PHP
- Use PHP for a wide variety of web technologies: e-commerce, blogs, automated email, RSS aggregation, etc.