How do I get a reference to the HTML memory buffer while the page is being constructed?

How do I get a reference to the HTML memory buffer while the page is being constructed?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)