![](/img/trans.png)
[英]How to include a folder of php files making an app to an html page?
[英]Include files in php app [HEROKU]
我的应用程序可以在localhost上运行,但是当我在heroku上部署它时出现此错误
Warning: require(app/classes/sendgrid/sendgrid-php.php): failed to open stream: No such file or directory in /app/index.php on line 10 Fatal error: require(): Failed opening required 'app/classes/sendgrid/sendgrid-php.php' (include_path='.:/app/.heroku/php/lib/php') in /app/index.php on line 10
我的项目结构是:
mailer //project name
|
|-- footer.php
|
|-- header.php
|
|-- index.php
|
|-- inc
| |
| |-- style.css
|
|-- app
|
|-- classes
|
|-- app.php
|
|-- sendgrid
|
|-- sendgrid-php.php
|
|-- ...
(在我的index.php中,我可以毫无问题地包含app.php)
问题不是出自sendgrid,因为我也有亚马逊s3的问题...
解决了,您所要做的就是在根目录中添加composer.json
文件(在本例中为mailer文件夹)。 该文件必须包含更少的{}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.