Home >Operation and Maintenance >Linux Operation and Maintenance >A common method for modifying PHP default environment variables in Linux!

A common method for modifying PHP default environment variables in Linux!

青灯夜游
青灯夜游forward
2022-07-05 13:52:452548browse

How to modify the default environment variables of php under Linux? The following article will introduce to you how to modify the system PHP default environment variables under Linux. I hope it will be helpful to you.

A common method for modifying PHP default environment variables in Linux!

Current PHP version

A common method for modifying PHP default environment variables in Linux!

Change the default php5.6 to 7.3

cd /etc && vim /etc/profile

Press i to enter editing

Put the following paragraph at the bottom

export PATH=/www/server/php/73/bin:$PATH

Press esc and enter : wq! Then press Enter to exit

Then enter the following command to take effect

source /etc/profile

A common method for modifying PHP default environment variables in Linux!

##Related recommendations: "

Linux Video Tutorial》、《PHP Video Tutorial

The above is the detailed content of A common method for modifying PHP default environment variables 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