• 安装完php 后添加到环境变量


     

    I have installed XAMPP v1.8.3 for my PHP development. I am new to Ubuntu, so I don't know how to set environment variable for PHP which is located at /opt/lampp/bin/php.

    I can run PHP scripts from localhost just fine, but I wanted to run them from the command line as well.

    I want to set this variable for every user, since I am the only one who uses this system.

    Environment variables are set in /etc/environment. You will find the $PATH variable in this file. This variable stores the path to binaries in various locations.

    To add /opt/lampp/bin to the location searched for binary files, just append this path preceded by a : to the path variable.

    For example, if the $PATH variable was:

    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
    

    add /opt/lampp/bin to the end of it, so that it becomes:

    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/lampp/bin
    

    After doing this, do a source /etc/environment

  • 相关阅读:
    区域赛
    kd树的创建和求最近邻
    Fliptile POJ
    第六周作业
    第四次作业
    第三次作业
    第二周作业
    第一次作业
    董雅洁 我的第0次作业
    21 UI_布局 之 线性布局 xml配置方式
  • 原文地址:https://www.cnblogs.com/oxspirt/p/6071284.html
Copyright © 2020-2023  润新知