I am trying to pass a string as a parameter from PHP to a c file, using exec()
Here's the PHP:
That goes fines.Code:$mystring = "foobar"; echo exec('./cairo21 -a $mystring');
The problem is when I am trying to accept the string into my compiled c file:
Compiler: error: invalid initializerCode:char webcompanyname = getopt(argc,argv, "a:");
cairo21.c:69:2: warning: initialization makes integer from pointer without a cast.
Apparently getopt returns an integer. Is that integer a pointer to the string? Thoughts greatly appreciated.