forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
971 B
42 lines
971 B
<?php |
|
|
|
include 'shm_teste.php'; |
|
|
|
if (ShmIsKey(SHM_IPC_FILE_AGENTE)) |
|
$shmkey = ShmGetKey(SHM_IPC_FILE_AGENTE, SHM_SIZE_AGENTE); |
|
|
|
|
|
echo "<br> key id AGENTE -> " . $shmkey . "<br>"; |
|
|
|
$data = ShmReadVar($shmkey, SHM_SIZE_AGENTE); |
|
print_r($data); |
|
|
|
$data["julio"] = 1; |
|
|
|
ShmWriteVar($data, $shmkey); |
|
|
|
$data = ShmReadVar($shmkey, SHM_SIZE_AGENTE); |
|
print_r($data); |
|
|
|
ShmDelete($shmkey); |
|
|
|
if (ShmIsKey(SHM_IPC_FILE_FILA)) |
|
$shmkey = isset($_SESSION[SHM_SESSION_FILA]) ? $_SESSION[SHM_SESSION_FILA] : ShmGetKey(SHM_IPC_FILE_FILA, SHM_SIZE_FILA); |
|
|
|
|
|
echo " <br> key id FILA -> " . $shmkey . "<br>"; |
|
|
|
$data = ShmRead($shmkey, 0, SHM_SIZE_FILA); |
|
echo $data; |
|
ShmDelete($shmkey); |
|
/* |
|
$file = '/var/www/html/aplicativo'; |
|
echo " ftok($file) --> " . ftok($file, 'I') . "<br />"; |
|
|
|
$file = '.'; |
|
echo " ftok($file) --> " . ftok($file, 'I') . "<br />"; |
|
|
|
$file = __FILE__; |
|
echo " ftok($file) --> " . ftok($file, 'I') . "<br />"; |
|
*/ |
|
?>
|
|
|