Changeset 3177
- Timestamp:
- Nov 1, 2008, 3:06:43 AM (14 years ago)
- Location:
- libcaca/trunk/caca-php/examples
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca-php/examples/cacainfo.php
r3175 r3177 47 47 48 48 49 if ( !posix_isatty(STDOUT))49 if (php_sapi_name() != "cli") { 50 50 die("You have to run this program with php-cli!\n"); 51 } 51 52 52 53 just_for_fun(); -
libcaca/trunk/caca-php/examples/demo.php
r3176 r3177 362 362 363 363 364 if ( !posix_isatty(STDOUT))364 if (php_sapi_name() != "cli") { 365 365 die("You have to run this program with php-cli!\n"); 366 } 366 367 367 368 main(); -
libcaca/trunk/caca-php/examples/dithering.php
r3175 r3177 12 12 */ 13 13 14 if ( !posix_isatty(STDOUT))14 if (php_sapi_name() != "cli") { 15 15 die("You have to run this program with php-cli!\n"); 16 } 16 17 17 18 $img = imagecreatefrompng(dirname(__FILE__)."/logo-caca.png"); 18 if (!$img) 19 if (!$img) { 19 20 die("Can not open image.\n"); 21 } 20 22 21 23 $dither = caca_create_dither($img); 22 if (!$dither) 24 if (!$dither) { 23 25 die("Can not create dither. Maybe you compiled caca-php without gd support.\n"); 26 } 24 27 25 28 $canvas = caca_create_canvas(0, 0); 26 29 $display = caca_create_display($canvas); 27 if (!$display) 30 if (!$display) { 28 31 die("Can not create display.\n"); 32 } 29 33 30 34 caca_dither_bitmap($canvas, 0, 0, caca_get_canvas_width($canvas), caca_get_canvas_height($canvas), $dither, $img); -
libcaca/trunk/caca-php/examples/figfont.php
r3175 r3177 24 24 } 25 25 26 if ( !posix_isatty(STDOUT))26 if (php_sapi_name() != "cli") { 27 27 die("You have to run this program with php-cli!\n"); 28 } 28 29 29 30 if ($argc < 3) { -
libcaca/trunk/caca-php/examples/polyline.php
r3175 r3177 19 19 } 20 20 21 if ( !posix_isatty(STDOUT))21 if (php_sapi_name() != "cli") { 22 22 die("You have to run this program with php-cli!\n"); 23 } 23 24 24 25 $canvas = caca_create_canvas(0, 0); -
libcaca/trunk/caca-php/examples/text.php
r3175 r3177 16 16 */ 17 17 18 if ( !posix_isatty(STDOUT))18 if (php_sapi_name() != "cli") { 19 19 die("You have to run this program with php-cli!\n"); 20 } 20 21 21 22 $string = <<<EOT
Note: See TracChangeset
for help on using the changeset viewer.