No output from PHP interactive on Windows

前端 未结 8 2084
轻奢々
轻奢々 2020-12-16 13:28

I\'m running php interactively from xampp (5.4.7) on my Win 7 machine and cannot get any output from the window. I searched around various solutions and nothing so far has

8条回答
  •  半阙折子戏
    2020-12-16 13:56

    The first line I type after entering php -a is slightly different to yours:

    
    

    The nuisance is that it returns to the Windows command prompt and you have to keep typing php -a and before you can type more.

    To save a bit of typing I created a shortcut, right-clicked it, opened its Properties dialog and entered the following command in the Target text box:

    C:\Windows\System32\cmd.exe /k "php -a"

    This shortcut opens a PHP prompt in interactive mode. Alternatively, this one starts in interactive mode and lists the PHP switches:

    C:\Windows\System32\cmd.exe /k "php -h & php -a"

提交回复
热议问题