global variables in php not working as expected

后端 未结 7 1812
被撕碎了的回忆
被撕碎了的回忆 2020-12-05 07:33

I\'m having trouble with global variables in php. I have a $screen var set in one file, which requires another file that calls an initSession() def

7条回答
  •  一生所求
    2020-12-05 07:40

    You need to put "global $screen" in every function that references it, not just at the top of each file.

提交回复
热议问题