Need to install the extension shmop
Find the PHP installation source file directory
Copy the code The code is as follows:
# cd /usr/local/php-5.4.0/ext/shmop
# /usr/local/php/bin/phpize
# ./configure --with-php-config=/usr/local /php/bin/php-config
# make && make install
Compilation and installation successful
Copy code The code is as follows:
# cd /usr/local/php/lib/php/extensions/no-debug -non-zts-20100525/
One more shmop.so
Add shmop.so in php.ini
extension=shmop.so
; Module Settings;
phpinfo() output
Write data
Copy code The code is as follows:
$shmid = shmop_open(864, 'c', 0755, 1024);
shmop_write($shmid, "Hello World!", 0);
phpinfo();
?>
Read data
Copy code The code is as follows:
$shmid = shmop_open(864, 'c', 0755, 1024);
shmop_write($shmid, "Hello World!", 0);
echo shmop_read($shmid, 0, 11);
?>
http://www.bkjia.com/PHPjc/718630.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/718630.htmlTechArticleYou need to install the extension shmop. Find the php installation source file directory and copy the code as follows: # cd /usr/local/php- 5.4.0/ext/shmop # /usr/local/php/bin/phpize # ./configure --with-php-config=/u...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn