How to integrate PHP and C program? -


let me put problem in simple way. have written c program, keep in server. developing website using php, other users can have access stand alone c program.

so here want php take input users , bring input , run c program , again take results of c program users using php(probably using same website itself).

please suggest me how it. easier me understand if can tell me using simple program. example c program has function adds 2 numbers. users can provide input (the numbers) using website. php somehow interact c function , return results user.

just use php exec command. i'm assuming have access actual c executable. http://www.php.net/manual/en/function.exec.php

<?php // outputs username owns running php/httpd process // (on system "whoami" executable in path) echo exec('whoami'); ?> 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -