dongyou8087 2016-05-12 13:38
浏览 28
已采纳

文件包括不在heroku服务器上工作(没有这样的文件或目录)

Php line is working fine on localhost but not on live heroku server, even if I have the same file and folder structure.

require(APPPATH . '../../vendor/mpdf/mpdf/mpdf.php');

I am getting following error on heroku live server is:

PHP Fatal error:  require(): Failed opening required 'application/../../vendor/mpdf/mpdf/mpdf.php' (include_path='.:/app/.heroku/php/lib/php') in /app/CI/application/libraries/PDFLib.php on line 5

spend a lot of time trying to figure out what could be the reasons behind this, any help will appreciated.

  • 写回答

1条回答 默认 最新

  • douluogu8713 2016-05-16 06:42
    关注

    I just ran composer update with my branch. It ends up updating the composer.lock file and adding the “mpd/mpdf” and “setasign/fpdi” packages

    So what is happening is, my composer.lock file doesn’t include mpdf or fpdi. When Heroku tries to build the application, it modifies the “vendor” directory to match what my composer.lock file specifies.

    And my composer.lock file specifies that mpdf and fpdi should not be part of the application

    However, this is different from the composer.json file, which specifies that mpdf and fpdi should be part of the application.

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

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘