How can I change php-cli version on Ubuntu 14.04?

后端 未结 7 881
面向向阳花
面向向阳花 2020-12-04 09:41

I am new to using Linux and I broke some php settings while tampering.

If I execute a php script containing: phpinfo(); it shows the php versions as 5.

相关标签:
7条回答
  • 2020-12-04 10:30

    You can try setting the path to the correct php version on the terminal command line:

    set PATH="/usr/bin/php5.6/bin:$PATH"
    

    Modify the path to match your own path to PHP 5.6 (ie. if it was installed first, it might be something like "/usr/bin/php").

    The "$PATH" at the end appends the current path value, so don't forget to use it.

    0 讨论(0)
提交回复
热议问题