How to call a linux executable program in php code?

2

I have a question, I have a web application in PHP from which I will receive a txt file. I need to call a program in linux that will execute this txt file and, I would like to know, how would I call a linux program in PHP code by sending the txt file I received?

    
asked by anonymous 25.07.2017 / 23:17

1 answer

3

If I understand correctly, you want to run some command from Linux or your OS by PHP. You can do this in three ways (PHP functions), each with its particularity:

exec

passthru

shell_exec

  

Of course, there are other functions for this that are more specific and these are not unique to such functionality. I just indicated the ones that I think are more adept to your need.

    
26.07.2017 / 04:46