Under what condition may HTIP headers be set from PHP if there is content echoed prior to the header function being used?
Under what condition may HTIP headers be set from PHP if there is content echoed prior to the header function being used?A . headers_sent() returns trueB . Output buffering is enabledC . The client supports local bufferingD . The webserver uses preemptive modeView AnswerAnswer: B
Which of the following items in the $_SERVER super global are important for authenticating the client when using HTTP Basic authentication? (Choose 2)
Which of the following items in the $_SERVER super global are important for authenticating the client when using HTTP Basic authentication? (Choose 2)A . PHP _AUTH_TYPEB . PHP _AUTH_PASSWORDC . PHP _AUTH_DIGESTD . PHP _AUTH_PWE . PHP _AUTH_USERView AnswerAnswer: D, E
What is the output of the following code?
What is the output of the following code? function increment ($val) { $_GET['m'] = (int) $_GET['m'] + 1; $_GET['m'] = 1; echo $_GET['m'];View AnswerAnswer: 1
Which of the following statements is true?
Which of the following statements is true?A . All PHP database extensions support prepared statementsB . All PHP database extensions come with their own special helper functions to escape user data to be used in dynamic SQL queriesC . All PHP database extensions provide an OOP interfaceD . All PHP...
Which of the following does NOT help to protect against session hijacking and fixation attacks?
Which of the following does NOT help to protect against session hijacking and fixation attacks?A . Use SSL and set the $secure cookie parameter to true.B . Set the session.use_only_cookies php.ini parameter to 1.C . Set the session.cookie_lifetime php.ini parameter toE . Protect against XSS vulnerabilities in the application.F ....
What is the output of the following code?
What is the output of the following code? function increment ($val) { $val= $val+ 1; $val= 1; increment ($val); echo $val;View AnswerAnswer: 1
Which of the following is NOT true about PHP traits? (Choose 2)
Which of the following is NOT true about PHP traits? (Choose 2)A . Multiple traits can be used by a single class.B . A trait can implement an interface.C . A trait can declare a private variable.D . Traits are able to be auto-loaded.E . Traits automatically resolve conflicts based...
Given the following code, how can we use both traits A and Bin the same class? (select all that apply)
Given the following code, how can we use both traits A and Bin the same class? (select all that apply) trait A { public function hello() { return "hello"; } public function world() { return "world"; } } trait B { public function hello() { return "Hello"; } public function...
Given the following Date Time object, which sample will NOT alter the date to the value '2014-02-15'?
Given the following Date Time object, which sample will NOT alter the date to the value '2014-02-15'? $date= new DateTime('2014-03-15');A . $date->sub(new Datelnterval('PlM'));B . $date->setDate(2014, 2, 15);C . $date->modify('-1 month');D . $date->diff(new Datelnterval('-PlM'));View AnswerAnswer: D
How can you do this?
You work for a shared hosting provider, and your supervisor asks you to disable user scripts to dynamically load PHP extensions using the di() function. How can you do this? (Choose 2)A . Set enable_dl to Off in the server's php.ini configuration file.B . Add di to the current value...