append semicolon
[lhc/web/wiklou.git] / maintenance / eval.php
1 <?php
2 /*require_once( "../includes/DefaultSettings.php" );
3 require_once( "../LocalSettings.php" );
4 require_once( "../includes/MemCachedClient.inc.php" );*/
5
6
7 require_once( "liveCmdLine.inc" );
8
9 do {
10 $line = readconsole( "> " ). ";" ;
11 eval( $line );
12 if ( function_exists( "readline_add_history" ) ) {
13 readline_add_history( $line );
14 }
15 } while ( 1 );
16
17 function readconsole( $prompt = "" ) {
18 if ( function_exists( "readline" ) ) {
19 return readline( $prompt );
20 } else {
21 print $prompt;
22 $fp = fopen( "php://stdin", "r" );
23 $resp = trim( fgets( $fp, 1024 ) );
24 fclose( $fp );
25 return $resp;
26 }
27 }
28
29
30
31 ?>
32