每日一题(15)

上一篇 / 下一篇  2007-10-25 20:13:20 / 个人分类:每日一题

7. Consider the following form and subsequent scrīpt. What will the scrīpt print out if the user types the word “php” and “great” in the two text boxes respectively?

<form action="index.php" method="post">

<input type="text" name="element[]">

<input type="text" name="element[]">

</form>

<?php

echo $_GET['element'];

?>

A. Nothing

B. Array

C. A notice

D. phpgreat

E. greatphp

Answer:

Since the form is submitted using a POST HTML transaction, whatever values are typed in the text boxes are only going to be available in the $_POST superglobal array. Therefore, Answer C is correct, since the $_GET array won’t contain any values and PHP will issue a notice to this effect.

 

8. In an HTTPS transaction, how are URLs and query strings passed from the browser to the web server?

A. They are passed in clear text, and the subsequent transaction is encrypted

B. They are encrypted

C. The URL is left in clear text, while the query string is encrypted

D. The URL is encrypted, while the query string is passed in clear text

E. To ensure its encryption, the query string is converted into a header and passed along with the POST information

Answer:

When an HTTPS transaction takes place, the browser and the server immediately negotiate an encryption mechanism so that any subsequent data is not passed in clear text—including the URL and query string, which are otherwise passed the same way as with a traditional HTTP transaction. Answer B is, therefore, correct.


TAG: 每日一题

 

评分:0

我来说两句

显示全部

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

数据统计

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

RSS订阅

Open Toolbar