.net里可以分参数缓存,不知道PHP里怎么做,UP一下
解决方案 »
- 逻辑题:六个男人和六个女人
- wordpress bible 插件第一个例子在试用时出现错误
- LAMP安装后各部件的默认目录
- 关于eval的返回值
- 关于PHP 数据库查询结果的缓存
- Zend Debugger为什么输出是空白的?
- 請問:PHP如何打開SQL Server數據庫裡面的PDf,word文件
- 关于PHP与MYSQL连接时的数据传输问题!
- 在window 2000 为什么连 MYSQL不上呢,应该怎样设置 ,急,帮帮忙
- SWFUpload 上传保存时会删掉中文字符?
- 求程序,关于PHP生成缩略图的程序
- win2000 +apache2+php5+mysql4+zend安装后,访问数据库提示#2003 - 服务器没有响应
例子 1. Shared Memory Operations Overview<?php
// Create 100 byte shared memory block with system id of 0xff3
$shm_id = shmop_open(0xff3, "c", 0644, 100);
if (!$shm_id) {
echo "Couldn't create shared memory segment\n";
}// Get shared memory block's size
$shm_size = shmop_size($shm_id);
echo "SHM Block Size: " . $shm_size . " has been created.\n";// Lets write a test string into shared memory
$shm_bytes_written = shmop_write($shm_id, "my shared memory block", 0);
if ($shm_bytes_written != strlen("my shared memory block")) {
echo "Couldn't write the entire length of data\n";
}// Now lets read the string back
$my_string = shmop_read($shm_id, 0, $shm_size);
if (!$my_string) {
echo "Couldn't read from shared memory block\n";
}
echo "The data inside shared memory was: " . $my_string . "\n";//Now lets delete the block and close the shared memory segment
if (!shmop_delete($shm_id)) {
echo "Couldn't shared memory block for deletion.";
}
shmop_close($shm_id);
?>