Home > Hosting > Program

Explain in detail how to find the location of PHP installation package in Linux.

2024-04-03 21:54:04

This article brings you some knowledge about PHP, which mainly introduces how to find the location of PHP installation package in Linux. There are code examples. Let's take a look at them with interested friends. I hope it will help you.

Php -version, if it can be executed, means that the execution PATH of PHP must be under path. If there is no response, we will find/-name php to find it.

Echo $PATH, my 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 also search find /usr/local/bin -name php.

Finally found the directory /www/server/php/72.

Recommended study: PHP video tutorial


Copyright Description:No reproduction without permission。

Knowledge sharing community for developers。

Let more developers benefit from it。

Help developers share knowledge through the Internet。

Follow us