php.exe is not recognized:create webapp

后端 未结 4 760
孤街浪徒
孤街浪徒 2021-01-12 00:16

I am toying with my new install of yii framework, and trying to compile my first webapp through the command line. when I run yiic webapp ../testdrive i receive

相关标签:
4条回答
  • 2021-01-12 00:59

    when we are creating webapp in yii framework : Or error ( "php.exe" is not recognized as an internal or external command, operable program or batch file )

    php.exe file path : C:\xampp\php\php.exe

    yiic.bat File path : C:\xampp\htdocs\YiiMain(foldername)\framework\yiic.bat

    "%PHP_COMMAND%" == "" set PHP_COMMAND=C:\xampp\php\php.exe

    0 讨论(0)
  • 2021-01-12 01:02

    Simply use the path of the php.exe before the yiic to execute the php script in windows environment.

    your command will look something like this:

    c:/xampp/php/php.exe path/yiic webapp application_name

    0 讨论(0)
  • 2021-01-12 01:07

    You need to add complete path in your php.exe in `yii\framework\yiic.bat

    for example in my case it is if

    "%PHP_COMMAND%" == "" set PHP_COMMAND=C:\wamp\bin\php\php5.3.8\php.exe

    0 讨论(0)
  • 2021-01-12 01:09

    just change the address in init.bat file as before

    if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe
    

    after

    if "%PHP_COMMAND%" == "" set PHP_COMMAND=C:\wamp\bin\php\php5.5.12\php.exe
    

    and save it.

    0 讨论(0)
提交回复
热议问题