Can I override the PHP built-in function echo()?

后端 未结 6 1181
無奈伤痛
無奈伤痛 2020-12-11 15:02

I recently looked at my source code and it was a real mess.

my php source:

echo \'

Rar

\'; echo \'Rar\'; e

6条回答
  •  独厮守ぢ
    2020-12-11 15:47

    You can set up and output buffer and then run the buffer through htmltidy. The tidy extension even has a specific function for the purpose. Just call this before you start outputting your html:

    ob_start('ob_tidyhandler');
    

提交回复
热议问题