is there a simple php shell for windows?

2019-03-13 02:17发布

Is there a command line php shell available for windows? I looking for something similar to the python shell, that will allow me to open and immediately begin executing code.

9条回答
【Aperson】
2楼-- · 2019-03-13 02:49

I found these two on github as well:

查看更多
我命由我不由天
3楼-- · 2019-03-13 02:51

There is php-shell - it is not great, but still way better than php -a. (Also, it is dead simple to install, just run pear install http://jan.kneschke.de/assets/2007/2/17/PHP_Shell-0.3.1.tgz.) There is also phpa-norl, but I haven't tried it.

查看更多
聊天终结者
4楼-- · 2019-03-13 02:56

Another simple variant, influenced by other answers. Create and run the following cmd-script:

@echo off
:loop
php.exe -r "while (true) { eval (fgets (STDIN) ); echo PHP_EOL; }"
goto loop

Immediate execution, Ctrl+C for exit. Insert correct path before "php.exe".

查看更多
登录 后发表回答