什么是系统的环境变量?phpstudy安装完成后计算机环境变量的设置

WBOY
Release: 2016-06-13 12:14:54
Original
4530 people have browsed it

什么是系统的环境变量?phpstudy安装完成后电脑环境变量的设置

所谓环境变量,可以理解为,预先准备好的一个装有命令的路径。这样我们在cmd下直接输入命令,那么此时,系统会从环境变量中的路径下去找这个命令。不然的话,我们要执行某个命令,就需要写出这个命令所在的完整路径,简直是噩梦。所以,设置环境变量的意思,就是预先把这个路径告诉系统。

比如,我们安装完phpstudy后,一般需要使用apache和mysql里的一些命令,找到这个安装程序,找到apache\bin下的任意一个命令,右击属性直接复制那个路径。然后在我的计算机>>>属性>>>高级系统设置>>>高级>>>环境变量>>>系统变量里的path>>>编辑即可。


测试:打开cmd,输入httpd -t检查配置文件的语法问题。此处只需要输入httpd这个命令即可,不仅连路径,而且连后缀.exe都省略掉了。


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!