Stifler
19.08.2011, 14:33
Da wir ja alle im Klassenwahn sind präsentiere ich euch meine Echo Klasse!
Voraussetzungen:
Webserver
PHP 3 oder höher
MySQL 1.0 oder gar nicht
Tastatur
<?
class EchoTEXT {
var $debug = false;
var $text;
function EchoTEXT() {
if($this->debug) {
$this->input("Debug!");
$this->output();
}
}
function output() {
echo $this->text;
}
function input($string) {
$this->text = $string;
}
function clear() {
$this->text = "";
}
function stopp() {
exit;
}
}
$txt = "Hallo World!";
$init = new EchoTEXT;
$init->input($txt);
$init->output();
$init->clear();
$init->stopp();
?>
Voraussetzungen:
Webserver
PHP 3 oder höher
MySQL 1.0 oder gar nicht
Tastatur
<?
class EchoTEXT {
var $debug = false;
var $text;
function EchoTEXT() {
if($this->debug) {
$this->input("Debug!");
$this->output();
}
}
function output() {
echo $this->text;
}
function input($string) {
$this->text = $string;
}
function clear() {
$this->text = "";
}
function stopp() {
exit;
}
}
$txt = "Hallo World!";
$init = new EchoTEXT;
$init->input($txt);
$init->output();
$init->clear();
$init->stopp();
?>