1

just wanted to know how to call php script from running C code on Linux and pass a couple of parameters.

Thanks

1 Answer 1

1
system("/usr/bin/php /path/to/program.php param1 param2");
Sign up to request clarification or add additional context in comments.

2 Comments

You should rather advice the use of execlp() or something like it, for security reasons.
This is a perfectly acceptable answer to the question that was asked. There was no mention of any mistrust of the script or data passed to it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.