Under Linux ,if I want to pass pure string from PHP to C, how do i do that? what I\'ve tried do far is:
exec(\"./myexec.bin -a mystring\");
try using echo and pipe the output to your C executable instead of using args:
echo
C
exec("/bin/echo | ./myexec.bin");
as @sarnold mentioned in comments it's wrong. Look at @Linus Kleen answer.
in your C program:
fopen(stdin, "r"); // ...