代码如下:
<?php
$sysid = $shmkey = ftok(__FILE__, 't');
$flags = "c";
$mode = 0766;
$size = 1024;
$shmid = shmop_open($sysid, $flags, $mode, $size);
shmop_write($shmid, "Hello", 0);
$len = shmop_size($shmid);
$cont = shmop_read($sysid, 0, "Hello");
var_dump($cont);
shmop_delete($shmid);
shmop_close($shmid);
?>
这段代码报错,请问是怎么回事?
PHP Warning: shmop_read(): no shared memory segment with an id of [1946257823] in /home/admin/codes/php/shmop/client.php on line 8
Warning: shmop_read(): no shared memory segment with an id of [1946257823] in /home/admin/codes/php/shmop/client.php on line 8
------解决思路----------------------
$cont = shmop_read($shmid, 0, "Hello");
友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群