From 1a4ee721714e795772d4e06b036d7535cbd8732c Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Wed, 2 Jun 2004 02:16:40 +0000 Subject: [PATCH] Immediate PHP statement execution in the fully initialised MediaWiki environment. --- maintenance/eval.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 maintenance/eval.php 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; + } +} + + + +?> + -- 2.20.1