Lecture 2 - Dive into PHP - annotated

Lecture 2 - Dive into PHP - annotated - Reminder Dive into...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Dive into PHP INFO/COM S 230: Intermediate Web Design and Programming Reminder CSS Crash Course is 5-7PM Thursday night in Upson B7. How the web works What can you do with PHP? Automatically generate XHTML/CSS files when accessed. Allows for: – Personalization – Response to form inputs – Automation of repetitive XHTML coding – And many, many more… Easy PDF Creator is professional software to create PDF. If you wish to remove this line, buy it now.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Your first PHP file <!DOCTYPE html PUBLIC "- //W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/D TD/xhtml1-strict.dtd"> <html> <head> <title>A Teeny Page</title> </head> <body> <p>Not much in here</p> </body> </html> What makes this PHP? <!DOCTYPE html PUBLIC "- //W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/D TD/xhtml1-strict.dtd"> <html> <head> <title>A Teeny Page</title> </head> <body> <p>Not much in here</p> </body> </html> File saved as teeny.php, not teeny.html Server scans file before returning Your second PHP file <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>A Teeny Page</title> </head> <body> <?php print("<p>Not much in here</p>"); ?> </body> </html> PHP generates XHTML <p> <?php print("Here is some text."); ?> </p> <p> Here is some text. </p> Dive into PHP An exercise Try to figure out (as best you can) what XHTML is generated, and then what appears in the webpage. We’ll then look at each part of the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/01/2008 for the course INFO 2300 taught by Professor Williamson during the Spring '08 term at Cornell.

Page1 / 7

Lecture 2 - Dive into PHP - annotated - Reminder Dive into...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online