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 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料