Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all..i am reading about apache server architecture.As we know that browser only understands html data,so .jsp ,.aspx or .php etc pages are rendered into html at server side and then only sent to client.I just want to know who render the .php page into html format at server side.
as we know that server sends data to client in packets but i want whole rendered html data at server side before it sent to client in html format.
Posted
Comments
Mohibur Rashid 31-Dec-13 6:27am    
you write the html code and required php code. php engine compile and execute your code and rendered the resulted data.
sunil pol 31-Dec-13 7:48am    
yes..but in php engine which module or .dll do that work??

1 solution

To catch rendering output in PHP you must use output buffering in your page (http://www.php.net/manual/en/ref.outcontrol.php[^])
Something like this:
PHP
<?php <br mode="hold" /?>  ob_implicit_flush(); 
?> 
// your other PHP and HTML code
  $buffer = ob_get_flush(); // buffer is the rendered page
?> 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900