Heroku PHP和Node.js在同一个应用程序中

I'm using a Node package called exec-php to execute PHP functions within Node.js app.

I would like to push that app to Heroku, but I'm wondering how to make that, and how that would be in the PHP bin locally.

I'm using /Applications/MAMP/bin/php/php7.0.0/bin/php. What would be the path to PHP bin in Heroku?

I tested vendor/bin/heroku-php-apache2 but it doesn't work, so what would be the path to PHP binary in Heroku?

The bin directory in heroku is : .heroku/php/bin/php

You'll need to inform the build API that you'd like to use multiple buildpacks. Try:

$ heroku buildpacks:clear
$ heroku buildpacks:add heroku/php
$ heroku buildpacks:add heroku/nodejs

Then you can inspect the compiled slug via heroku run bash to verify that the bins are where you expect them to be.