Home > Backend Development > PHP Tutorial > php cli 小技能

php cli 小技能

WBOY
Release: 2016-06-13 12:10:59
Original
885 people have browsed it

php cli 小技巧

很简单,特别方便php做一些cli应用的调试和PHP模版?

?

源于:http://www.huiyi8.com/php/

1. [代码][PHP]代码 ? ??

var_dump($argv);

?

?

2. [代码][Shell/批处理]代码 ? ??

?

@echo off

:BEGIN

set /p input=any key to run or "c" exit:

if "%input%"=="c" goto END

goto RUN

?

:RUN

..\bin\php.exe -r ?"echo \"\r\n\r\n\";"

..\bin\php.exe run.php %input%

..\bin\php.exe -r ?"echo \"\r\n\r\n\";"

goto BEGIN

?

:END

exit

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template