Workshop

 <  Day Day Up  >  

Quiz

1:

The following URL will work as expected.

< a href="/cgi/foo.pl? name =Ben Franklin&Job=printer">

  1. True.

  2. False; you can't pass two parameters to a CGI program in this way.

  3. False; the space in the name Ben Franklin is not allowed.

2:

Why does using cookies for long- term storage sometimes fail?

  1. Browsers can "throw away" cookie information.

  2. Cookies can be lost during software updates.

  3. Users may turn off cookie support in their browsers.

3:

To make a cookie expire one week from now, use the -expire option to the cookie function with what?

  1. +7d

  2. +1w

  3. +10080m

Answers

A1:

c. You should use escape to properly hide spaces and other special characters .

A2:

All the above.

A3:

Either choice a or c. The +1w argument is invalid.

Activities

  • Use a Telnet client to connect to one of your favorite Web sites, and try fetching a Web page manually.

  • Extend the background color changer to set foreground colors and fonts. Randomly select an image to display on the page by editing the target of an <img> tag.

 <  Day Day Up  >  


SAMS Teach Yourself Perl in 24 Hours
Sams Teach Yourself Perl in 24 Hours (3rd Edition)
ISBN: 0672327937
EAN: 2147483647
Year: 2005
Pages: 241

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net