公司项目需要用到 ftok() 函数,它的作用是:“将路径名和项目标识符转换为System V IPC密钥”。查阅手册时发现,在编译PHP的时候,需要开启以下模块。
Support for this functions are not enabled by default. To enable System V semaphore support compile PHP with the option --enable-sysvsem . To enable the System V shared memory support compile PHP with the option --enable-sysvshm . To enable the System V messages support compile PHP with the option --enable-sysvmsg .
注意
Semaphore 扩展, Note: 此扩展在 Windows 平台上不可用。