How to pass value and run c program in php( web application)

前端 未结 2 509
小蘑菇
小蘑菇 2021-01-13 02:20

I am having big c program.I want execute that function in php and get value

For example

C program

int add( int, int);         
         


        
2条回答
  •  时光说笑
    2021-01-13 02:55

    There's a way to do that - but it's not trivial by any means. You need to write a php extension in c/c++, install it on the server where the php will be executed and update you php.ini - and then you'll have access to the c/c++ functions directly from php. Have a look here: http://devzone.zend.com/article/1021 about how to write extensions.

提交回复
热议问题