Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Zend 200-710 Exam - Topic 4 Question 75 Discussion

Posted by Lili on Sep 17, 2024 at 10:25 PM

Under what condition may HTTP headers be set from PHP if there is content echoed prior to the header function being used?

Suggested Answer: B

Get Premium 200-710 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
38 comments · newest first
FL
Fletcher 11 months ago
I agree, output buffering saves the day!
CH
Charolette 12 months ago
Wait, can you really set headers after echoing? Sounds off.
TI
Timothy 12 months ago
Definitely B! That's how it works.
CL
Clement 1 year ago
I thought headers couldn't be sent after output?
RO
Rosita 1 year ago
Output buffering is the way to go!
VA
Vallie 1 year ago
I’m a bit confused about the other options, but I don’t recall anything about local buffering being relevant. It seems like a trick option to me.
NI
Nikita 1 year ago
I think we practiced a question like this before, and it was about enabling output buffering. So, I’m leaning towards option B as well.
MA
Margot 1 year ago
I’m not entirely sure, but I feel like headers_sent() returning true means you can't set headers anymore. So that can't be the answer, right?
MI
Minna 1 year ago
I remember something about output buffering being important for sending headers after content. I think it might be option B?
CH
Chau 1 year ago
The key here is to remember that headers need to be sent before any output is generated. If there's already content echoed, you'll need to use output buffering to capture that output and then send the headers. B seems like the right answer.
MA
Martin 1 year ago
I'm a bit confused by this question. I'm not sure I fully understand the relationship between headers, output, and buffering. I'll need to do some more research on this topic.
AH
Ahmed 1 year ago
I'm pretty confident on this one. I believe the answer is B - output buffering needs to be enabled in order to set headers after output has started.
CA
Candida 1 year ago
Okay, let's see... I think it has something to do with output buffering, but I'm not sure of the exact details. I'll need to review that concept.
MA
Mabel 1 year ago
Hmm, this looks like a tricky one. I'll need to think carefully about the conditions that allow setting headers after output has already started.
DA
Danilo 2 years ago
I'm leaning towards B, but I'll double-check the PHP documentation just to be sure. Can't afford to get this one wrong!
MA
Madonna 1 year ago
↳ replying to Danilo
C) The client supports local buffering
TA
Tatum 1 year ago
↳ replying to Danilo
B) Output buffering is enabled
MA
Markus 1 year ago
↳ replying to Danilo
A) headers_sent() returns true
JO
Joanna 2 years ago
Haha, I bet the webserver using 'preemptive mode' is just a made-up answer choice to confuse us. Nice try, exam writers!
JA
Jamal 1 year ago
↳ replying to Joanna
Haha, I bet the webserver using 'preemptive mode' is just a made-up answer choice to confuse us. Nice try, exam writers!
MY
Myong 2 years ago
↳ replying to Joanna
B) Output buffering is enabled
LA
Lavonna 2 years ago
↳ replying to Joanna
A) headers_sent() returns true
HE
Herman 2 years ago
Hmm, I'm not sure. I'll have to review my notes on HTTP headers in PHP. This is a tricky one.
BE
Bette 1 year ago
↳ replying to Herman
That makes sense. I'll have to double check my notes on that.
EM
Emilio 1 year ago
↳ replying to Herman
I think it's B) Output buffering is enabled
GA
Gail 1 year ago
↳ replying to Herman
B) Output buffering is enabled
TR
Tracey 1 year ago
↳ replying to Herman
A) headers_sent() returns true
LI
Linsey 2 years ago
Wait, isn't the correct answer A? I thought headers_sent() returns true when you've already sent headers.
BE
Bernardine 2 years ago
↳ replying to Linsey
That's right. It's important to check if headers have been sent before trying to set them.
CO
Colby 2 years ago
↳ replying to Linsey
Yes, you are correct. headers_sent() returns true if headers have already been sent.
ED
Edna 2 years ago
I'm not sure, but I think headers_sent() returning true would also allow setting headers after content is echoed.
MA
Marcelle 2 years ago
I agree with Audrie, because output buffering allows headers to be set after content is echoed.
AU
Audrie 2 years ago
I think the answer is B) Output buffering is enabled.
ST
Stephanie 2 years ago
I think it's B. Output buffering needs to be enabled to set headers after content has been echoed.
EV
Evelynn 1 year ago
↳ replying to Stephanie
It's a good practice to prevent any header-related issues.
TA
Tamar 1 year ago
↳ replying to Stephanie
I always make sure to enable output buffering when working with PHP.
CH
Chantell 2 years ago
↳ replying to Stephanie
Yes, you're right. Output buffering is necessary in this case.
GI
Gilberto 2 years ago
↳ replying to Stephanie
I think it's B. Output buffering needs to be enabled to set headers after content has been echoed.
0/2000 characters

Save Cancel