Skip to content

Instantly share code, notes, and snippets.

@rinogo
Created April 28, 2021 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rinogo/68ade044ee0250f4415a9e6c6bc2444c to your computer and use it in GitHub Desktop.
Save rinogo/68ade044ee0250f4415a9e6c6bc2444c to your computer and use it in GitHub Desktop.
[Simple email debug] Instead of a bunch of `var_dump()` or `echo` statements (which can break AJAX responses, etc.), use these simple `mail()` lines.
//String
mail("me@example.com", __FILE__ . ":" . __LINE__, "Example");
//Export variable
mail("me@example.com", __FILE__ . ":" . __LINE__, var_export($alternative_image, true));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment