Free ZF-100-500 Exam Braindumps (page: 9)

Page 8 of 33

You have given the following XML data in the tasks.XML file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<tasklist>
<note>
<tasks>Validate data</tasks>
<details>String Validation</details>
</note>
<note>
<tasks>Secure data</tasks>
<details>Encryption</details>
</note>
</tasklist>
Now, you run the following PHP script:
<?php
$objDOM = new DOMDocument();
$objDOM->load("tasks.xml");
$note = $objDOM->getElementsByTagName("note");
foreach( $note as $value )
{
$tasks = $value->getElementsByTagName("tasks");
$task = $tasks->item(0)->nodeValue;
$details = $value->getElementsByTagName("details");
$detail = $details->item(0)->nodeValue;
echo "$task :: $detail <br>";
}
?>
What should be displayed when this script is executed?

  1. The contents of the whole XML document
  2. The XML of every tasks and details nodes
  3. The contents of every tasks and details nodes
  4. The XML of whole XML document

Answer(s): C



You run the following PHP script:
<?php
$name = mysql_real_escape_string($_POST["name"]);
$password = mysql_real_escape_string($_POST["password"]);
?>
What is the use of the mysql_real_ escape_string() function in the above script. Each correct answer represents a complete solution. Choose all that apply.

  1. It can be used as a countermeasure against a SQL injection attack.
  2. It escapes all special characters from strings $_POST["name"] and $_POST["password"]except ' and ".
  3. It escapes all special characters from strings $_POST["name"] and $_POST["password"].
  4. It can be used to mitigate a cross site scripting attack.

Answer(s): A,C



Which of the following can be used as a countermeasure against the SQL injection attack?
Each correct answer represents a complete solution. Choose two.

  1. session_regenerate_id()
  2. Prepared statement
  3. mysql_escape_string()
  4. mysql_real_escape_string()

Answer(s): B,D



Which of the following statements correctly explains the behavior of Zend_Controller_Front?
Each correct answer represents a complete solution. Choose all that apply.

  1. It registers a plug-in broker with itself.
  2. It uses the Singleton pattern.
  3. It processes all requests received by the server.
  4. The Zend_Controller_Front never loads any plugin by default.

Answer(s): A,B,C






Post your Comments and Discuss Zend ZF-100-500 exam with other Community members:

ZF-100-500 Discussions & Posts