git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1207 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
29 lines
847 B
PHP
29 lines
847 B
PHP
<?php
|
|
require_once ("output.php");
|
|
class outputtxt extends output
|
|
{
|
|
public function out ($data)
|
|
{
|
|
@header("Cache-Control: no-store, no-cache, must-revalidate");
|
|
@header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
|
|
@header('Last-Modified: '.gmdate ('D, d M Y H:i:s').' GMT');
|
|
@header('Cache-Control: post-check=0, pre-check=0', false);
|
|
@header('Pragma: no-cache');
|
|
@header ("Content-Type: text/plain");
|
|
if ($data === TRUE)
|
|
echo "OK\n";
|
|
elseif ($data === FALSE)
|
|
echo "FALSE\n";
|
|
elseif (is_string ($data))
|
|
echo "$data\n";
|
|
elseif (is_integer ($data))
|
|
echo "$data\n";
|
|
elseif (is_array ($data))
|
|
echo substr (print_r ($data, TRUE), 8, -3)."\n";
|
|
elseif ($data === NULL)
|
|
echo "NULL\n";
|
|
else
|
|
echo "TODO : ".gettype ($rc)." on ".__FILE__.":".__LINE__."\n";
|
|
}
|
|
}
|