PHP - purpose
of output buffering in PHP - Jan 22, 2009 at 18:00 pm by Rajmeet Ghai
Explain the purpose of output buffering in PHP.
Output buffering in PHP buffers a
scripts output. This buffer can be edited before returning it to the client.
Without output buffering, PHP sends data to the web server as soon as it is
ready. Output buffering "send" cookies at any point in the script. Cookies do
not have to be necessarily sent near the start of page. Output buffers are
stackable and hence sending to output is by choice.
Describe session in PHP.
When a user logs in an application, his details are usually stored in a session
variable. This information is available to all pages in one application.
Sessions in PHP work using a unique id for each visitor.
|