Page 1 of 1

php with C (Linking the two program)

Posted: Tue Jun 24, 2008 11:10 am
by kapil1089theking
I have written an html document where i can read two integers now i would like to add the two integers using a program add.c in the same folder, which will return the result again to the php page, can anybody help me to do this?

Re: php with C (Linking the two program)

Posted: Tue Jun 24, 2008 12:21 pm
by helraizer
kapil1089theking wrote:I have written an html document where i can read two integers now i would like to add the two integers using a program add.c in the same folder, which will return the result again to the php page, can anybody help me to do this?
Why not just use php for the adding? Or is the C doing something else?

Re: php with C (Linking the two program)

Posted: Tue Jun 24, 2008 12:31 pm
by Kieran Huggins
shell_exec() maybe?

Re: php with C (Linking the two program)

Posted: Tue Jun 24, 2008 2:00 pm
by kapil1089theking
yes the c program is doing something else, I need to work with the same C file and get the returned value at the php page back.

can you write the syntax for shell_exec() statement?

Re: php with C (Linking the two program)

Posted: Tue Jun 24, 2008 2:08 pm
by kapil1089theking
Thanx the problem is solved.