我无法将PHP应用程序部署到Heroku

Tob*_*y D 2 php heroku

这是我第一次与Heroku联系(真的很棒)。我按照以下步骤将我的第一个应用程序部署到heroku。

git init
git add .
git commit -m 'first commit'
heroku create abcfirstapp
git remote add origin git@heroku.com:abcfirstapp.git
git push heroku master
Run Code Online (Sandbox Code Playgroud)

我得到了这样的错误

Heroku推送被拒绝,未检测到任何受Cedar支持的应用程序到git@heroku.com:abcfirstapp.git [remote.rejected] master-> master(拒绝预接收钩子)错误:无法将某些引用推送到'git @ heroku。 com:abcfirstapp.git'

我非常确定我的php文件已写好,因为它可以在本地xampp服务器上正常运行

<?PHP phpinfo(); ?>
Run Code Online (Sandbox Code Playgroud)

还有一个问题是:当我尝试使用

git pull heroku master
Run Code Online (Sandbox Code Playgroud)

我有一个错误

致命的:找不到远程引用主机

有人可以帮我吗?

谢谢

fri*_*ism 5

默认的PHP buildpack通过在仓库根目录中查找来 检测PHP应用程序index.php。你有其中之一吗?

或者,您可以对构建包进行硬编码:

heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php
Run Code Online (Sandbox Code Playgroud)