作者buganini (霸格尼尼)
看板PHP
标题Re: PHP 的 application 变数?
时间Thu Feb 8 09:28:30 2007
※ 引述《antontw (习惯)》之铭言:
: 最近碰过 apc 这个 lib , // 可参考前面 ajax 抓上传进度的部份
: 不过支援的 php 版版次好像非常後面 // 5.2 以後的样子
: 这个 lib 可以设定跨 process 的变数,
: 有点像 jsp 的 global 的意思。
: 另外,如果是你自已管的机器,
: 其实也可以试试 php 的 ipc ,
: 因为 ipc 资源蛮珍贵的,且有安全上的顾虑,
: 所以不建议後面这个方式。
查ipc/apc的路上
忽然想到
那个ramdisk直接用shm开一块来写就好啦........
就完全OS Independent了
/*
後记
http://tw.php.net/manual/zh/ref.shmop.php
注: Versions of Windows previous to Windows 2000 do not support shared memory.
Under Windows, Shmop will only work when PHP is running as a web server module,
such as Apache or IIS (CLI and CGI will not work).
previous to有包含2000吗?
还是说只要NT kernel都行?
*/
看到这一篇
http://www.hoyo.idv.tw/hoyoweb/document/view.php?sid=204&author=hoyo&status=view
还不错
但apc更为方便
http://php.net/manual/zh/function.apc-store.php
但底下也说了...他不能存array
看到上面的mixed很高兴的说ˋˊ
附送的解决方案:serialize()......
--
满天都是shm
满地都是serialize
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 163.22.93.130
※ 编辑: buganini 来自: 163.22.93.130 (02/08 09:35)
※ 编辑: buganini 来自: 163.22.93.130 (02/08 09:35)
※ 编辑: buganini 来自: 163.22.93.130 (02/08 12:40)
1F:→ buganini:所以目前最简易的选择是shm + serialize()了..... 02/08 12:42