PHP Classes
Icontem

File: test.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Hemp Cluster  >  cmd class  >  test.php  
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
 

Contents

Class file image Download
<?php

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

require_once(
dirname($_SERVER["PHP_SELF"]).$tz."cmd_class.php");

$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);

$a[]="line1".$le;
$a[]="line2".$le;

$cmd->writelines($a);

exit;

?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products