且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从 powershell-commandline 运行 php 脚本?

更新时间:2023-02-03 20:48:26

因为你说的是​​ powershell,所以我假设是 Windows.你可以在windows上安装php,但这也意味着安装apache或启用IIS.

I'm assuming windows since you said powershell. You can just install php on windows but that means also installing apache or enabling IIS.

或者显然有一个内置网络服务器用于命令-线功能,可以最大限度地减少配置这些东西所涉及的麻烦.

Or there's apparently a built-in webserver for command-line functionality that might minimize the amount of headache involved in configuring that stuff.

这也可能有助于您前进:http://php.net/手册/en/install.windows.legacy.index.php#install.windows.legacy.commandline

This might help get you going also: http://php.net/manual/en/install.windows.legacy.index.php#install.windows.legacy.commandline