gpt4 book ai didi

php - Heroku 远程 MongoDB 与 php 连接

转载 作者:可可西里 更新时间:2023-11-01 10:34:25 25 4
gpt4 key购买 nike

我从 Heroku facebook 应用程序连接到远程 mongoDb 时出错

Class 'Mongo' not found

我想 mongo 驱动程序不支持开箱即用?我如何在 heroku 上安装它?谢谢

最佳答案

您只需要为您的应用安装 mongo 扩展

Vendor the Mongo driver with your application. You can download it here:

https://github.com/wuputah/heroku-libraries/raw/master/php/mongo/mongo.so Add it to a folder like "ext".

Add a php.ini file to the root of your application:

extension_dir = "/app/www/ext/" extension=mongo.so

在这里找到解决方案: https://gist.github.com/1288447

关于php - Heroku 远程 MongoDB 与 php 连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11469055/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com