Home  >  Article  >  Backend Development  >  Detailed explanation of how to find the location of PHP installation package in Linux

Detailed explanation of how to find the location of PHP installation package in Linux

藏色散人
藏色散人forward
2023-04-20 15:34:321940browse

This article brings you relevant knowledge about PHP. It mainly introduces how to find the location of the PHP installation package in Linux. There are code examples. Friends who are interested can take a look below. I hope it will be helpful to you. Everyone is helpful.

Detailed explanation of how to find the location of PHP installation package in Linux

  1. ##php -version, if it can be executed, it means that the execution path of PHP must be under PATH. If there is no response, Let's find / -name php to find.

  2. echo $PATHMy display is like this

    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
    Let’s guess the possible path:

  • /usr/local/bin
  • /usr/bin
    Same Search
  1. find /usr/local/bin -name php<pre class="brush:php;toolbar:false">[root@localhost swoole]# find /usr/local/bin -name php[root@localhost swoole]#  [root@localhost swoole]# find /usr/bin -name php/usr/bin/php</pre> found that under /usr/bin/php

Detailed explanation of how to find the location of PHP installation package in Linux##Finally found the directory

/www/server/php/72

##Recommended study: "

PHP Video Tutorial

"                                                  

The above is the detailed content of Detailed explanation of how to find the location of PHP installation package in Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:learnku.com. If there is any infringement, please contact admin@php.cn delete