If I'm writing an application to communicate with a program, would using exec
be the way to go, or is there another way?
Asked
Active
Viewed 47 times
0
-
There are other ways. `exec` might work fine though. Is something not working for you currently? Are you worried about some injection? – user3783243 Jun 09 '18 at 23:51
-
What are the other ways, I am going to communicate with a command line application, and I want a method that has little to no overhead – yabo Jun 09 '18 at 23:53
-
For example using exec I expect will open a cmd.exe program all the time to execute these commands (The same with linux) – yabo Jun 09 '18 at 23:54
-
How do most programmers go about communicating with a command line application? Or any piece of software really – yabo Jun 09 '18 at 23:55
-
Maybe this thread would be useful https://stackoverflow.com/questions/732832/php-exec-vs-system-vs-passthru – user3783243 Jun 09 '18 at 23:56
-
You might want to check that exec is enabled on the server, on some servers it might be disabled – SpacePhoenix Jun 10 '18 at 00:16
-
What do you mean "outside program"? Another process on the same server? A process on a different server? API? You need to elaborate on what you're trying to do – Machavity Jun 10 '18 at 00:20
-
MySQL is an "outside program" is it not? – Scuzzy Jun 10 '18 at 00:28