每日一题(12)

上一篇 / 下一篇  2007-10-22 20:05:18 / 个人分类:每日一题

1. How are session variables accessed?

A. Through $_GET

B. Through $_POST

C. Through $_REQUEST

D. Through global variables

E. None of the above

 

Answer:

    Although session data can be accessed using the global variables if the register_globals INI setting is turned on, the exam uses a version of PHP configured using the default php.ini file found in the official PHP distribution. In recent versions of PHP, the register_globals setting is turned off by default because of its serious security implications. As a result, Answer E is correct.

 

2. What function causes the following header to be added to your server’s output?

Set-Cookie: foo=bar;

Your Answer: ____________________________

Answer:

     Clearly, this question refers to the setcookie or setrawcookie functions, although the header function could be used as well.


TAG: 每日一题

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

数据统计

  • 访问量: 16944
  • 日志数: 87
  • 建立时间: 2007-09-29
  • 更新时间: 2008-04-15

RSS订阅

Open Toolbar