�����������
�����
������
������� ��������� �������� VPS - ������� ������ �������� Dedicated server
�������:

VPS - �������:

������ ��������:

Dedicated server:


������ ���������:

������ ����������� ��������

www.megastock.ru

Z-Payment
������ ������
Moneybookers
Payment Network
��������
Contact
�������� ������
MasterCard
VISA
������� CONTACT
�������� �������
��� 24
WIRE USD EURO
������ Z-PAYMENT
SMS ������
��������� ����
��������� ������-�����
��������� ComePay
��������� FreeCash

�����������  �������. �������

�������:











XCIII. Shared Memory

Shmop , , , UNIX shared memory). Windows, shared-. shmop --enable-shmop .

: d PHP 4.0.3 shm shmop.

1. Shared Memory
<?php
   
//  100-  shared memory   id if 0xff3
$shm_id = shmop_open(0xff3, "c", 0644, 100);
if(!$shm_id) {
	echo "Couldn't create shared memory segment\n";
}

//    shared memory
$shm_size = shmop_size($shm_id);
echo "SHM Block Size: ".$shm_size. " has been created.\n";

//     shared memory
$shm_bytes_written = shmop_write($shm_id, "my  shared memory", 0);
if($shm_bytes_written != strlen("my  shared memory")) {
	echo "Couldn't write the entire length of data\n";
}

//   
$my_string = shmop_read($shm_id, 0, $shm_size);
if(!$my_string) {
	echo "Couldn't read from  shared memory\n";
}
echo "The data inside shared memory was: ".$my_string."\n";

//        shared memory
if(!shmop_delete($shm_id)) {
	echo "Couldn't mark  shared memory for deletion.";
}
shmop_close($shm_id);
   
?>
shmop_close - shared memory
shmop_delete - shared memory
shmop_open - shared memory
shmop_read - shared memory
shmop_size - shared memory
shmop_write - shared memory

session_write_close shmop_close


Copyright 2008-2010
Prime Hosting
Prime Hosting. , VPS - ,  , dedicated serverPrime Hosting. , VPS - , , dedicated server:
VPS - Dedicated server