php - output buffering ob_get_contents not returning anything -


i trying generate static html php however, cannot output $page, ideas? cheers

ob_start(); $pageident = $tempdbid;    include 'newpagegenerator.php'; $page  = ob_get_contents(); ob_end_clean(); 

you need output using echo statement.

ob_start(); $pageident = $tempdbid;    include 'newpagegenerator.php'; $page  = ob_get_contents(); echo $page;//<----- echo here ob_end_clean(); 

Comments

Popular posts from this blog

python - matpltolib navigation toolbar edit curves and parameters line color automatically changes issue -

node.js - Nodejs javascript implementation of PBEWithMD5AndTripleDES/CBC/PKCS5Padding -