note 62595 deleted from function.ob-start by bjori

From: Date: Wed, 29 Mar 2006 13:18:21 +0000
Subject: note 62595 deleted from function.ob-start by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-106944@lists.php.net to get a copy of this message
Note Submitter: moppi at mulank10 dot de ---- this code is used to see variables and errors, when you are working with headers. <?PHP ob_start(); /* some code */ print_r($var); // print var $aaa = ob_get_contents(); // write cache into a var $file = fopen("vars.txt","w+"); //open file fputs($file,$aaa); fclose($file); chmod("vars.txt",0644); ob_end_clean(); // destroy cache header("content-type: image/jpeg"); //see image imagegif($pic); imagedestroy($pic); ?>

« previous php.notes (#106944) next »