Created
September 8, 2017 06:12
-
-
Save koobitor/48cccf4489065cd5392de4df382f1c29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Parse json body to array | |
$data = json_decode(file_get_contents("php://input"), true); | |
// Set logs file destination | |
$dir = getcwd()."/logs.log"; | |
// Open file logs | |
$file = fopen($dir,"a"); | |
// Write data into file logs | |
fwrite($file,print_r($data,1)); | |
// Close file logs | |
fclose($file); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment