Page 1 of 1

running C file from PHP

Posted: Thu Feb 06, 2003 4:05 am
by gghaleb1
hi all,

Does anyone know how i can use php to start executing a c file (e.g. test.c) and return a value to PHP to be stored in a variable?

if that is not possible then can i do the same thing with a compiled c program (e.g. test.exe)?

can anyone give me an example code, becasue i am not an expert at PHP!
Thanks :D

gghaleb1

Posted: Thu Feb 06, 2003 4:14 am
by ReDucTor
it needs to be compiled first. then just use the shell/system functions..

Posted: Thu Feb 06, 2003 7:49 am
by gghaleb1
ok, can you give me an example code. cos i read about system() function but still don't know how to use it.
After running the compiled program, is there a way to return the results from the compiled program to php.

Posted: Thu Feb 06, 2003 8:16 am
by ReDucTor
see

http://php.net/system

or search google.com