最佳答案:首先明确一点 php的全局变量可以分为 1.自定义的全局变量通过关键字 global 声明变量为全局变量 $a =1;function bb(){ global $a;}2.系统自带的全局变量ph