note 113501 added to function.print-r

From: Date: Sun, 20 Oct 2013 21:43:30 +0000
Subject: note 113501 added to function.print-r
Groups: php.notes 
Request: Send a blank email to php-notes+get-196594@lists.php.net to get a copy of this message
Sometimes, when page is called by ajax and you're not actually feeling convenient to see output of debugging, you may log it in file like shown below: <?php // Log superglobals $g=print_r($_GET,true); $p=print_r($_POST,true); $f=print_r($_FILES,true); $s=print_r($_SESSION,true); $txt=''; $txt.="/n".'GET: '.$g; $txt.="/n".'POST: '.$p; $txt.="/n".'FILES: '.$f; $txt.="/n".'SESSION: '.$s; file_put_contents('requests.txt',$txt); ?> ---- Server IP: 69.147.83.199 Probable Submitter: 91.213.119.253 ---- Manual Page -- http://php.net/manual/en/function.print-r.php Edit -- https://master.php.net/note/edit/113501 Del: integrated -- https://master.php.net/note/delete/113501/integrated Del: useless -- https://master.php.net/note/delete/113501/useless Del: bad code -- https://master.php.net/note/delete/113501/bad+code Del: spam -- https://master.php.net/note/delete/113501/spam Del: non-english -- https://master.php.net/note/delete/113501/non-english Del: in docs -- https://master.php.net/note/delete/113501/in+docs Del: other reasons-- https://master.php.net/note/delete/113501 Reject -- https://master.php.net/note/reject/113501 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#196594) next »