2018-09-04 16:13:16 1857次浏览 2条回答 0 悬赏 100 金钱

我建了一个console的控制台项目,在本地可以运行 php /项目路径/yii controller/action 访问,部署到linux上后,
我想这样访问的时候出现 Unknown command controller/action,请问我应该怎么配置什么,才能正常访问这个路径?

最佳答案

  • drodata 发布于 2018-09-04 18:53 举报

    在服务器终端输入 ./yii, 输出内容大致如下:

    This is Yii version 2.0.13.1.
    
    The following commands are available:
    
    - asset                                Allows you to combine and compress your JavaScript and CSS files.
        asset/compress (default)           Combines and compresses the asset files according to the given configuration.
        asset/template                     Creates template of configuration file for [[actionCompress]].
    
    - billing                              
        billing/create                     每月月初生成上月电子账单
        billing/flush                      清除上月账单信息
    

    里面列出了所有可用的 actions (上面的 billing 是我自定义的一个控制器), 确认一下里面有你要执行的 action.

    1 条回复
    回复于 2018-09-05 16:40 回复

    谢谢 谢谢

    觉得很赞
您需要登录后才可以回答。登录 | 立即注册
kkk
副董事长

kkk

注册时间:2015-03-06
最后登录:2023-06-19
在线时长:87小时58分
  • 粉丝5
  • 金钱31760
  • 威望0
  • 积分32630

热门问题