Shared memory file in PHP

I use openssl_pkcs7_sign and openssl_pkcs7_encrypt to create encrypted data. The functions only accept file names. I would like to store the temporary files in shared memory to improve performance. I understand in Linux I can file_put_contents('/dev/shm/xxx', data), but it is not possible for Windows. Is there portable way in PHP to do this? Would shmop_ function help here? Thanks.

PS: Or is there way to make these functions accept data strings?

PS2: Please do not suggest invoking /usr/bin/openssl from PHP. It is not portable.

9
задан Crend King 25 August 2011 в 12:47
поделиться