Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
Peachpie is attempt to get PHP scripts running on .NET Core with minimal effort of work by developers. To convince you there is reason to do it, take a look at Peachpie benchmarks. They have also sample WordPress project available to show that it is also possible to run on .NET COre the real things built on PHP.
Run these commands on machine where .NET Core is installed.
mkdir MyWebSite1 dotnet new -i Peachpie.Templates::* dotnet new peachpie-web cd MyWebsite1.Server dotnet restore dotnet run
Now open browser and move to http://localhost:5000 page.
PHP pages are held MyWebsite1 project. This is referred from MyWebSite1.Server where code is built and run.
PHP script here is simple.
<?php echo "Hello .NET Core!"; ?>
This is how web server is initialized and run in Program.cs file of .NET Core application.
- Running PHP applications on .NET Core (Gunnar Peipman)