note 99776 added to reserved.variables.globals
| From: | tech at anat dot org dot au | Date: | Mon, 06 Sep 2010 09:19:42 +0000 |
| Subject: | note 99776 added to reserved.variables.globals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-172328@lists.php.net to get a copy of this message | ||
If you want to email yourself a copy of the GLOBALS (like I just had to in an AJAX call, in order to
see why a particular variable wasn't working), you can use print_r with the 2nd parameter so it
returns the information as a string instead of outputting it.
<?php
@mail('your@emailaddress.com', 'Email Subject', "Email content : GLOBALS
info\n". print_r($GLOBALS,true), "From: your@emailaddress.com");
?>
Note that the print_r($GLOBALS,true) part is the important bit.
----
Server IP: 117.104.162.229
Probable Submitter: 203.122.233.106 (proxied: 203.122.233.106)
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.globals.php
Edit -- https://master.php.net/note/edit/99776
Del: integrated -- https://master.php.net/note/delete/99776/integrated
Del: useless -- https://master.php.net/note/delete/99776/useless
Del: bad code -- https://master.php.net/note/delete/99776/bad+code
Del: spam -- https://master.php.net/note/delete/99776/spam
Del: non-english -- https://master.php.net/note/delete/99776/non-english
Del: in docs -- https://master.php.net/note/delete/99776/in+docs
Del: other reasons-- https://master.php.net/note/delete/99776
Reject -- https://master.php.net/note/reject/99776
Search -- https://master.php.net/manage/user-notes.php