ini_set('display_errors', 1); error_reporting(E_ALL); file_put_contents("log.txt", json_encode($_POST ?: json_decode(file_get_contents("php://input"), true)));