duangan6797 2013-11-25 13:11
浏览 61
已采纳

如何在laravel4中使用MongoDB?

I have successfully installed Mongodb on my win 7 system. I also installed php extension for MongoDB on my Wamp server and it works perfectly; yet I wish to know how I can use MongoDB in my laravel4 projects. I will like to use mongovel package but when I run 'composer update' there is always an error: php extension not found in your system. Also I installed jessengers package but got an error: MongoClient not available. Please I need help on how to get out of this. Thanks

  • 写回答

1条回答 默认 最新

  • douzhang3356 2013-11-25 13:34
    关注

    You need to make sure that the extension is also available on the command line. In many cases there is a different php.ini for CLI. You can find this out by running:

    php --ri mongo
    

    if that does not provide any sort of output about version and settings, you don't have it installed properly.

    Then you can use php --ini to find out where your INI files are - the ones that are used for running PHP on the command line

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)