-bash: php: command not found
本文环境 php 不懂的可以评论或联系我邮箱:owen@owenzhang.com 原文地址:https://blog.csdn.net/qq_40816144/article/details/106708925
使用linux 的时候 找不到php命令了
-bash: php: command not found
然后就尴尬了
登录你的服务器 打开根目录下的 这个文件
vim /etc/profile
查看一下 是否有这个路径配置 如果没有就找到你现在使用的 php目录

这个我自己的php目录 一定要找到你自己的哦!

然后在 /etc/profile 文件中 加上一下的两句设置
PATH=$PATH:/www/server/php/56/bin export PATH
最后执行一下 这个 环境更换命令
source /etc/profile
如果还是不行 就重新一下服务器吧
Buy me a cup of coffee 🙂
觉得对你有帮助,就给我打赏吧,谢谢!
