• 1.摘要
  • 2.基本信息
  • 3.简介
  • 4.安装
  • 4.1.注意事项
  • 5.函数方法
  • 6.使用示例
  • 7.PHP语言介绍

shmop

Shmop是一个易于使用的功能集,允许PHP读,写,创建和删除UNIX共享内存段。

基本信息

  • 外文名

    shmop

  • 平台

    Windows 2000

  • close

    关闭共享内存块shm

  • delete

    删除共享内存块

简介

Shmop是一个易于使用的功能集,允许PHP读,写,创建和删除UNIX共享内存段。

安装

要使用shmop ,您将需要使用 - enable - shmop在配置行中的参数来编译PHP。

注意事项

到Windows 2000以前的Windows版本不支持共享内存。在Windows下, Shmop只会当PHP作为Web服务器模块运行,如Apache或IIS ( CLI和CGI将无法正常工作) 。

函数方法

shmop_close— 关闭共享内存块

shmop_delete— 删除共享内存块

shmop_open— 创建或打开共享内存块

shmop_read—从共享内存块读取数据

shmop_size— 获取共享内存块的大小

shmop_write— 到共享内存块写入数据

使用示例

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";