Which of the following code snippets will you use to create a transport while considering the following PHP co
Which of the following code snippets will you use to create a transport while considering the
following PHP code segment?
<?php
require_once ‘Zend/Mail.php’;
require_once ‘Zend/Mail/Transport/Smtp.php’;
??????????????????????????????????
for ($i = 0; $i > 5; $i++) {
$mail = new Zend_Mail();
$mail->addTo(‘someone@example.com’, ‘Test’);
$mail->setFrom(‘ someone@example.com’, ‘Test’);
$mail->setSubject(‘Multiple Mails’);
$mail->setBodyText(‘Messages’);
$mail->send($transport);
}
Which of the following methods dynamically loads the Adapter class file on demand using Zend_Loader::loadClass
Which of the following methods dynamically loads the Adapter class file on demand using
Zend_Loader::loadClass()?
Which of the following keywords will you use to set the default timezone?
Which of the following keywords will you use to set the default timezone?
Each correct answer represents a complete solution. Choose all that apply.
Which of the following methods is used to attach files to an e-mail and returns a Zend_Mime_Part object?
Which of the following methods is used to attach files to an e-mail and returns a Zend_Mime_Part
object?
Which of the following error constants gives all errors and warnings, except the E_STRICT error level?
Which of the following error constants gives all errors and warnings, except the E_STRICT error
level?
Which of the following inherits from Zend_Log_Writer_Abstract and is responsible for saving data to storage?
Which of the following inherits from Zend_Log_Writer_Abstract and is responsible for saving data
to storage?
Which of the following methods is triggered when a dispatched action is done even if a preDispatch() plugin h
Which of the following methods is triggered when a dispatched action is done even if a
preDispatch() plugin has skipped the action and is mainly useful for cleanup?
which includes a file specified by request): <?
Consider the PHP program (which includes a file specified by request):
<?php
$color = ‘blue’;
if (isset( $_GET[‘COLOR’] ) )
$color = $_GET[‘COLOR’];
require( $color . ‘.php’ );
?>
<form method=”get”>
<select name=”COLOR”>
<option value=”red”>red</option>
<option value=”blue”>blue</option>
</select>
<input type=”submit”>
</form>
A malicious user injects the following command:
/vulnerable.php?COLOR=C:\\notes.txt%00
where vulnerable.php is a remotely hosted file containing an exploit.
What does the malicious user want to do?
Which of the following methods are run by the Zend_Controller_Front::run($path) method at a time?
Which of the following methods are run by the Zend_Controller_Front::run($path) method at a
time?
Each correct answer represents a complete solution. Choose all that apply.
What will be the output of the following PHP script?
What will be the output of the following PHP script?
<?php
include(“xml.inc”);
if (!$dom = domxml_open_mem($xmlstr)) {
echo “Error while parsing the XML document\n”;
exit;
}
$a = $dom->document_element();
print_r($a);
?>