From 47cb18001f6777b2c149c819497a3e8ed7edca81 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 24 Oct 2019 09:21:52 +0200 Subject: cleanup for web env --- redis.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'redis.php') diff --git a/redis.php b/redis.php index aacc581..7c42d0b 100644 --- a/redis.php +++ b/redis.php @@ -12,6 +12,9 @@ namespace Remi; if (PHP_VERSION_ID < 70400 || !extension_loaded("ffi")) { die("PHP 7.4 with ffi extension required\n"); } +if (PHP_SAPI != "cli") { + Header('Content-Type: text/plain'); +} printf("PHP version %s\n", PHP_VERSION); if (PHP_SAPI == "cli" && !class_exists("\\Remi\\Redis")) { printf("Fallback on manual load\n\n"); -- cgit