如何在本地运行部署在heroku中的php项目?

VÍg*_*çky 1 php heroku heroku-toolbelt heroku-postgres heroku-api

操作系统:Windows.

C:\Users\vigne>cd project
C:\Users\vigne\project>heroku local //directory of cloned project from github
Run Code Online (Sandbox Code Playgroud)

我收到了这个:

[WARN] No ENV file found
5:11:01 PM web.1 |  'vendor' is not recognized as an internal or external command,
5:11:01 PM web.1 |  operable program or batch file.
[DONE] Killing all processes with signal  null
5:11:01 PM web.1 Exited with exit code 1
Run Code Online (Sandbox Code Playgroud)

小智 7

在你的Procfile中添加这个dyno

local: php -S localhost:8080
Run Code Online (Sandbox Code Playgroud)

并使用此dyno在本地运行heroku通过此命令启动heroku本地服务器 -

heroku local local
Run Code Online (Sandbox Code Playgroud)

然后打开http:// localhost:8080 /