Skip to content

Instantly share code, notes, and snippets.

@zetas
Created July 30, 2017 06:14
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 zetas/5a0878228ad4c3930f5fdaef2a20c182 to your computer and use it in GitHub Desktop.
Save zetas/5a0878228ad4c3930f5fdaef2a20c182 to your computer and use it in GitHub Desktop.
output variables to a logfile
<?php
$log = fopen('/tmp/webhook.log', 'a+');
ob_start();
var_dump($_SERVER);
$content = ob_get_clean();
fwrite($log, $content);
fclose($log);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment