Adding PHP to HTMLAfter all those preliminary exertions, (Web domain)

Adding PHP to HTMLAfter all those preliminary exertions, we finally get to the point ofwriting our first PHP scripts. Here you ll learn about PHP mode, PHP tags, and how to include other files in your PHP scripts. You llalso write your very first PHP program. Your HTML Is Already PHP-Compliant! PHP is already perfectly at home with HTML in fact, it is generallyembedded within HTML. As you ll see in later chapters, PHP ridespiggyback on some of the cleverer parts of the HTML standard, suchas forms and cookies, to do all kinds of useful things. Anything compatible with HTML on the client side is also compatiblewith PHP. PHP could not care less about chunks of JavaScript, calls tomusic and animation, applets, or anything else on the client side. PHPwill simply ignore those parts, and the Web server will happily passthem on to the client. It should thus be clear that you can use any method of developingWeb pages and simply add PHP to that method. If you re comfortablehaving teams work on each page using huge multimedia graphicssuites, you can keep on doing that. The general point is that youdon t need to change tools or workflow order just do what you vebeen doing and add the server-side functionality at the end. Escaping from HTMLBy now you re probably wondering: How does the PHP parser recog- nize PHP code inside your HTML document? The answer is that youtell the program when to spring into action by using special PHP tagsat the beginning and end of each PHP section. This process is calledescaping from HTMLor escaping into PHP. Not to confuse you, but escapein this sense should not be con- fused with another common use of the term escapein PHP: putting a backslash in front of certain special characters (such astab and newline) within double-quoted strings. Escaping strings isexplained in Chapter 8. Caution44CHAPTER …In This ChapterEscaping into PHPmodeChoosing PHP tag stylesWriting a Hello Worldprogram in PHPIncluding files …
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision mysql5 web hosting services

Leave a Reply