can i execute or include a c program through php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ammo
    New Member
    • Mar 2010
    • 2

    can i execute or include a c program through php

    i have a c program having code for svmlight.throug h php i am entering protien sequence and make a file of it.now i wanted that at the time of making text file the c program will run and we find the solution.plz help me on this.
  • dgreenhouse
    Recognized Expert Contributor
    • May 2008
    • 250

    #2
    There are two ways of doing this...

    Either create a PHP extension (the most difficult) or use the PHP exec, system, or passthru commands.

    How you'll get the data back from the svm application is another story, but as it sounds like your svm application creates a text file, you might get away with using the exec command and wait for it to return. Then you could read in the text file that gets created and process that however is appropriate.

    Comment

    Working...