using shared memory with php and c?

前端 未结 2 492
后悔当初
后悔当初 2021-01-20 17:07

Can you use shared memory to communicate between php scripts and c program in windows?

The c program runs all the time and uses memory mapped files ie:



        
2条回答
  •  失恋的感觉
    2021-01-20 17:36

    The PHP shmop functions are just wrappers for the underlying POSIX functions, which doesn't seem to be available under windows.

    From the PHP manual:

    Note: Versions of Windows previous to Windows 2000 do not support shared memory. Under Windows, Shmop will only work when PHP is running as a web server module, such as Apache or IIS (CLI and CGI will not work).

    Appearently PHP emulates this behaviour within apache, but since it isn't available in the stand alone binaries it will hardly integrate with the windows equivalents.

提交回复
热议问题