Dec 1, 2008

Mostly Asked Question

What is functioning of ob_start() and exec()?

ob_start(): This function will turn output buffering on. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer.

exec() : executes the given command, however it does not output anything. It simply returns the last line from the result of the command. If you need to execute a command and have all the data from the command passed directly back without any interference, use the passthru() function.

No comments: