Making all PHP file output pass through a “filter file” before being displayed

后端 未结 5 1792
傲寒
傲寒 2020-12-17 02:43

Is there any way for all my PHP and/or HTML file output to be \"filtered\" before being displayed in the browser? I figured that I could pass it through a global function b

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-17 03:24

    You can use output buffering and specify a callback when you call ob_start()

    
    
    
        some stuff
        
    
    

提交回复
热议问题