Workshop

Quiz

1: Can a user read the source code of PHP script you have successfully installed?
2: What do the standard PHP delimiter tags look like?
3: What do the ASP PHP delimiter tags look like?
4: What do the script PHP delimiter tags look like?
5: What syntax would you use to output a string to the browser?

Answers

A1: No, the user sees only the output of your script.
A2:
. . . .<?php
. . . . // your code here
. . . . ?>.
A3:
. . . .<%
. . . .// your code here
. . . .%>.
A4:
. . . .<script language="php">
. . . .// your code here
. . . .</script>.
A5: We would usually use print() to write to the browser, although we could use echo() with the same results.

Get Sams Teach Yourself PHP in 24 Hours, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.