Lecture 2 - Dive into PHP - annotated

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

Info icon This 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.
Image of page 1

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

View Full Document Right Arrow Icon
2 Your first PHP file <!DOCTYPE html PUBLIC "- //W3C//DTD XHTML 1.0 Strict//EN" " 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" " 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" " "> <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.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern