From fee77cac00b2b5f3d6831620eca1d975d2a0da3e Mon Sep 17 00:00:00 2001 From: Ben Wiley Sittler Date: Tue, 4 Nov 2008 03:56:18 +0000 Subject: [PATCH] force cli on remaining examples so that apache doesn't pop up a window (this actually happens with the cocoa driver!) --- caca-php/examples/cacapig.php | 3 +++ caca-php/examples/colors.php | 4 ++++ caca-php/examples/fullwidth.php | 4 ++++ caca-php/examples/render.php | 4 ++++ caca-php/examples/truecolor.php | 4 ++++ 5 files changed, 19 insertions(+) diff --git a/caca-php/examples/cacapig.php b/caca-php/examples/cacapig.php index 0eb9060..0ea30b6 100755 --- a/caca-php/examples/cacapig.php +++ b/caca-php/examples/cacapig.php @@ -16,6 +16,9 @@ * http://sam.zoy.org/wtfpl/COPYING for more details. */ +if (php_sapi_name() != "cli") { + die("You have to run this program with php-cli!\n"); +} $pig_str = <<