php 如何获取php安装路径

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23640576/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 16:51:14  来源:igfitidea点击:

How to get php installation path

php

提问by Oto Shavadze

How can you find out what the PHP installation path is on a server?

你怎么能找出服务器上的PHP安装路径?

回答by tester

In your terminal run the following:

在您的终端中运行以下命令:

which php

which php

http://unixhelp.ed.ac.uk/CGI/man-cgi?which

http://unixhelp.ed.ac.uk/CGI/man-cgi?which

Running PHP's https://php.net/phpinfoshould tell you more about the PHP that's currently running your scripts.

运行 PHP 的https://php.net/phpinfo应该会告诉您有关当前正在运行脚本的 PHP 的更多信息。

<? phpinfo();

回答by Abhilash Muthuraj

In a command prompt, type

在命令提示符下,键入

which php

whereis php

哪个php

php在哪里