|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-24 16:06 UTC] tony2001@php.net
[2004-09-14 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 09:00:02 2025 UTC |
Description: ------------ <?php /*$shm_id = shmop_open(0xff3,"c",0,0); if ($shm_id) { $shm_size = shmop_size($shm_id); $my_string = shmop_read($shm_id, 0, $shm_size); $cache=serialize($my_string); shmop_close($shm_id); }*/ make error //print_r($cache); $name="shm1.php"; $time1=filectime($name); if(isset($cache[$name])){ if($cache[$name]['time']==$time1){ $shm_id = shmop_open($cache[$name]['key'],"c",0,0); $shm_size = shmop_size($shm_id); $my_string = shmop_read($shm_id, 0, $shm_size); echo $my_string; shmop_close($shm_id); clearstatcache ( void ); exit; } } $d=file_get_contents($name); $i=strlen($d); $c=count($cache); echo $d; $shm_id = shmop_open((int)$c,"c",0644,$i); $shm_bytes_written = shmop_write($shm_id, $d,0); shmop_close($shm_id); //echo "<pre>".$d."</pre>"; $a['time']=filectime($name); $a['key']=$c; $cache[$name]=$a; print_r($cache); //echo $cache[$name]['time']; //echo filectime($name); //$cache $d=serialize($cache); // echo "<pre>".$d."</pre>"; $i=strlen($d); $shm_id = shmop_open(0xff3,"c",0644,$i); $shm_bytes_written = shmop_write($shm_id, $d,0); shmop_close($shm_id); clearstatcache(); ?>