我查了下PHP MANUAL,也有共享内存函数,里面说 Shmop is an easy to use set of functions that allows PHP to read, write, create and delete UNIX shared memory segments. These functions will not typically work on Windows, as it does not support shared memory. As of Windows 2000 though, enabling the php_shmop.dll in your php.ini will enable this functionality though.也就是WIN2K也可以用共享内存,如果只传递一个字符串还好,但是传递数组也不方便啊
有一个基类Application,存放全局变量
然后每一个页面都是一个基类的子类
这样就可以通过基类共享消息了
不知道能否对你有所帮助
就算自己写一个类,要处理线程访问冲突有很大工作量和开销的
Shmop is an easy to use set of functions that allows PHP to read, write, create and delete UNIX shared memory segments. These functions will not typically work on Windows, as it does not support shared memory. As of Windows 2000 though, enabling the php_shmop.dll in your php.ini will enable this functionality though.也就是WIN2K也可以用共享内存,如果只传递一个字符串还好,但是传递数组也不方便啊