Category «200-500»

Exam 200-500: Zend PHP 5 Certification

When this form is submitted, the following PHP code gets executed: 1 <?

An HTML form contains this form element:<code><input type=”file” name=”myFile” />When this form is submitted, the following PHP code gets executed:1 <?php2 move_uploaded_file(3 $_FILES[‘myFile’][‘tmp_name’],4 ‘uploads/’ . $_FILES[‘myFile’][‘name’]);5 ?></code>Which of the following actions must be taken before this code may go into production?(Choose 2) A.Check withis_uploaded_file() whether the uploaded file $_FILES[‘myFile’][‘tmp_name’] is valid B.Sanitize the file name …

which of the following actions?

The function mysqli_affected_rows() can be used to perform which of the following actions?(Choose 2) A.get the number of rows that are affected by SELECT statements B.get the number of rows that are affected by UPDATE statements C.get the number of rows that are affected by INSERT statements D.get the number of rows in a result …

Which of the following SimpleXML calls print the name of the second book?

Consider the following XML code:<code><?xmlversion=”1.0″ encoding=”utf-8″?><books><book id=”1″>PHP 5 Power Programming</book><book id=”2″>Learning PHP 5</book></books></code>Which of the following SimpleXML calls print the name of the second book? (Choose 2)(Let $xml=simplexml_load_file(“books.xml”);) A.echo $xml->books->book[2]; B.echo $xml->books->book[1]; C.echo $xml->book[1]; D.echo $xml->xpath(“/books/book[@id=2]”); E.$c = $xml->children(); echo $c[1]; Show Answer

What is the output of the following script?

What is the output of the following script?<code>1 <?php2 function ratio ($x1 = 10, $x2)3 {4 if (isset ($x2)) {5 return $x2 / $x1;6 }7 }89 echo ratio (0);10 ?></code> A.0 B.An integeroverflow error C.A warning, because $x1 is not set D.A warning, because $x2 is not set E.A floating-point overflow error Show Answer