No output from PHP interactive on Windows

前端 未结 8 2077
轻奢々
轻奢々 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:51

    To use in windows. Ensure you have a PATH variable to php directly in your windows environment. May require restart. Use gitbash/cmd/rails shell/nodejs etc. but shouldn't make any difference. Open cmd

    Check php with command: php -v if all good populates the php version etc etc

    load interactive mode with: php -a enter your code once enabled, for example as follows (each line has carriage return) the ^z is the shell output of pressing the ctrl key and the z key together this runs your small snippet but instantly pops you out of php interactive mode

    
    ^z
    

    (will return 11) was really good at maths ha:-)

提交回复
热议问题