简体   繁体   English

在Heroku上部署PHP网站

[英]Deploy PHP website on Heroku

I have got heroku up and running just now. 我刚刚启动了heroku并开始运行。 Not sure how to use the PostgreSQL and how to deploy my website though. 虽然不确定如何使用PostgreSQL以及如何部署我的网站。 It is a few php files. 它是一些php文件。 But they php files don't open they are just blank so I guess it is never leaving the index.php 但是他们的php文件没有打开,它们只是空白,所以我想它永远不会离开index.php。

Do i need to include or list all my php files in the default index.php file? 我是否需要在默认的index.php文件中包括或列出我所有的php文件?

Also with the database i created one and it is in the dashboard listed under apps so now can I connect to it normally or is there more stuff to configure? 同样,使用我创建的数据库,该数据库位于应用程序下方列出的仪表板中,因此现在我可以正常连接到该数据库了,还是需要配置更多的东西?

Would love some video tutorials showing how to deploy small database driven websites written in PHP to heroku. 希望有一些视频教程展示如何将用PHP编写的小型数据库驱动的网站部署到heroku。

Any help is great! 任何帮助都很棒! Cheers guys :) 干杯们:)

If you want to use postgresql database with your website on Heroku, you need this add-on . 如果要在Heroku上的网站上使用postgresql数据库,则需要此插件 To set it up read this https://devcenter.heroku.com/articles/heroku-postgresql post. 要进行设置,请阅读此https://devcenter.heroku.com/articles/heroku-postgresql帖子。

As for PHP, you seem new to it. 至于PHP,您似乎是新手。 To include a file you need to use either require or include . 要包含文件,您需要使用requireinclude

You can look at this video , for basic deployment of PHP on Heroku. 您可以观看此视频 ,了解在Heroku上进行PHP的基本部署。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM