From: Tim Starling Date: Wed, 2 Jun 2004 02:16:40 +0000 (+0000) Subject: Immediate PHP statement execution in the fully initialised MediaWiki environment. X-Git-Tag: 1.5.0alpha1~3081 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=1a4ee721714e795772d4e06b036d7535cbd8732c;p=lhc%2Fweb%2Fwiklou.git Immediate PHP statement execution in the fully initialised MediaWiki environment. --- diff --git a/maintenance/eval.php b/maintenance/eval.php new file mode 100755 index 0000000000..76518f0cf0 --- /dev/null +++ b/maintenance/eval.php @@ -0,0 +1,32 @@ + " ); + eval( $line ); + if ( function_exists( "readline_add_history" ) ) { + readline_add_history( $line ); + } +} while ( 1 ); + +function readconsole( $prompt = "" ) { + if ( function_exists( "readline" ) ) { + return readline( $prompt ); + } else { + print $prompt; + $fp = fopen( "php://stdin", "r" ); + $resp = trim( fgets( $fp, 1024 ) ); + fclose( $fp ); + return $resp; + } +} + + + +?> +