PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Steffen Stollfuß  >  cmd class  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Simple Test File
Class: cmd class
Access input/output data from command line scripts
Author: By
Last change: ---bug fix
Date: 18 years ago
Size: 788 bytes


Class file image Download

if(substr(PHP_OS,0,3) == "WIN" )
$le = "\r\n";
$tz = "\\";
$tz = "/";


$cmd = new cmd();

$cmd->writeln("-_-_-_- Hello -_-_-_-".$le);

$cmd->writeline("Gib mal was ein".$le);

$str = $cmd->readln();

$cmd->writeln("Deine Eingabe war: ".$str.$le);

$cmd->writeln("So jetzt mal mehrere Zeilen, die Letzte ended auf \".\"".$le);

$arr = $cmd->readlines(".");

printf("Das waren jetzt %d Zeilen: %s%s%s", count($arr) , $le , implode($le,$arr) , $le);

$cmd->writeln("So alles klar hier....das wars auch schon".$le);

$cmd->writeln("Hello this is writeln() test".$le);





For more information send a message to info at phpclasses dot org.