php with C (Linking the two program)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kapil1089theking
Forum Commoner
Posts: 46
Joined: Wed May 28, 2008 1:51 pm
Location: Kolkata, India
Contact:

php with C (Linking the two program)

Post 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?
helraizer
Forum Commoner
Posts: 31
Joined: Thu Jun 05, 2008 8:20 pm

Re: php with C (Linking the two program)

Post 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?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: php with C (Linking the two program)

Post by Kieran Huggins »

shell_exec() maybe?
kapil1089theking
Forum Commoner
Posts: 46
Joined: Wed May 28, 2008 1:51 pm
Location: Kolkata, India
Contact:

Re: php with C (Linking the two program)

Post 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?
kapil1089theking
Forum Commoner
Posts: 46
Joined: Wed May 28, 2008 1:51 pm
Location: Kolkata, India
Contact:

Re: php with C (Linking the two program)

Post by kapil1089theking »

Thanx the problem is solved.
Post Reply