BackEnd Technologies
BACK END TECHNOLOGY 1.PHP Incorporating PHP Within HTML By default, PHP documents end with the extension .php. When a web server encoun‐ ters this extension in a requested file, it automatically passes it to the PHP processor. Of course, web servers are highly configurable, and some web developers choose to 35 force files ending with .htm or .html to also get parsed by the PHP processor, usually because they want to hide the fact that they are using PHP. Your PHP program is responsible for passing back a clean file suitable for display in a web browser. At its very simplest, a PHP document will output only HTML. To prove this, you can take any normal HTML document such as an index.html file and save it as index.php, and it will display identically to the original. To trigger the PHP commands, you need to learn a new tag. Here is the first part: A small PHP “Hello World” program might look like Example 3-1. Example 3-1. Invoking PHP The way you use this tag is quite flexib...