Running Codeigniter via CLI outputs website root instead of expected result

前端 未结 6 1767
慢半拍i
慢半拍i 2020-12-20 12:57

I\'m following this tutorial on running Codeigniter via the CLI. I\'ve done everything they\'ve done (copied and pasted) now when I run this command, it doesn\'t do

6条回答
  •  盖世英雄少女心
    2020-12-20 13:59

    Ok sorry to say but here on this page https://ellislab.com/codeigniter/user-guide/general/cli.html

    They didn't mention whether the root path of the folder where we place the codeigniter or the controllers folder. I searched a lot over that issue. I tried different things and then I found that.

    before that set PHP to your PATH environment variables {Run php file in windows CMD}

    after setting the PATH environment variables

    1. go to cmd
    2. cd the path where you put codeigniter (i.e CI/)
    3. php index.php/tools/message

    you will get

    Hello World!
    

    on to your cmd screen.

提交回复
热议问题