Skip to content

Instantly share code, notes, and snippets.

@jpmirandas
Created May 28, 2015 11:51
Show Gist options
  • Save jpmirandas/a2b4f4951c7e8027ecb4 to your computer and use it in GitHub Desktop.
Save jpmirandas/a2b4f4951c7e8027ecb4 to your computer and use it in GitHub Desktop.
PHP Decode base64 to text
$file = file_get_contents('/tmp/file', FILE_TEXT);
$file_decoded = base64_decode($file);
echo file_put_contents('/tmp/file.html', $file_decoded, FILE_TEXT);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment