How To Run PHP From Windows Command Line in WAMPServer

前端 未结 11 835
予麋鹿
予麋鹿 2020-11-22 04:58

I\'m new to php and wanted to run php from command line. I have installed WAMP and set the \"System Variables\" to my php folder ( which is C:\\wamp\\bin\\php\\php5.4.

11条回答
  •  一整个雨季
    2020-11-22 05:24

    If you want to just run a quick code snippet you can use the -r option:

    php -r "echo 'hi';"
    

    -r allows to run code without using script tags

提交回复
热议问题