Reading and writing global variables across scripts in PHP

前端 未结 9 1904
悲&欢浪女
悲&欢浪女 2020-12-11 21:56

Does PHP have global variables that can be modified by one running script and read by another?

9条回答
  •  不知归路
    2020-12-11 22:14

    Each request is handled by a php instance of its own. Global variables in php are only accessible from within the same php instance. However you can use something like the memchached module to share data between different instances (which should usually be faster than writing the data to the filesystem).

提交回复
热议问题