How to call a linux executable program in php code?

Asked

Viewed 168 times

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 on linux that will run this txt file and, I would like to know, how I would call a linux program in the PHP code sending the txt file I received?

  • 2

    Your question made no sense. You can [Dit] and try to be clearer?

  • 2

    Is this what you are looking for? http://php.net/manualen/function.exec.php

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 own 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 merely indicated the ones I find most adept at your need.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.