using shared memory with php and c?

前端 未结 2 520
后悔当初
后悔当初 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:45

    I wanted to allow PHP to access shared memory that was created and written to by a Windows application. I achieved this by creating my own php extension (called php_gsect.dll). This may not be what you want but my php_gsect attaches to the global section and reads (or writes) a number of bytes which I can then manipulate.

    FYI: My windows application is retreiving dynamic trend data from another system and putting the data into a named global section. The php web page is accessing the data from the global section and creating a chart (using the ESJ chart library).

提交回复
热议问题