昨天在Theweekin.NET中发现ScottHanselman的这篇博文Peachpie-OpenSourcePHPCompilerto.NETandWordPressunderASP.NETCore,知道了PeachpiePHP编译器加入了.NET基金会,借助Peachpie,.NETCore已经支持PHP。
今天在Linux上实际体验一下PHPunder.NETCore。
首先用dotnet命令安装一下Peachpie模板
#dotnetnew-iPeachpie.Templates::*Restoringpackagesfor/root/.templateengine/dotnetcli/v2.0.0-preview2-/scratch/restore.csproj...InstallingPeachpie.Templates0.7.0.GeneratingMSBuildfile/root/.templateengine/dotnetcli/v2.0.0-preview2-/scratch/obj/restore.csproj.nuget.g.props.GeneratingMSBuildfile/root/.templateengine/dotnetcli/v2.0.0-preview2-/scratch/obj/restore.csproj.nuget.g.targets.Restore