-1

let's say I have

user@123:~/project/tools$ ./res.sh ../example/data/data.sql

how can do that in php because I don't want to do that manually when I run my code

john
  • 1
  • 1
  • take a look [exec](http://php.net/manual/en/function.exec.php) or [shell_exec](http://php.net/manual/en/function.shell-exec.php) – ArtOsi Aug 24 '17 at 15:01
  • 3
    Possible duplicate of [Executing unix shell commands using PHP](https://stackoverflow.com/questions/5631600/executing-unix-shell-commands-using-php) – ficuscr Aug 24 '17 at 15:03

1 Answers1

0

In your PHP file you add the following line:

exec("/home/123/project/tools/res.sh ../example/data/data.sql");
AlexPac
  • 620
  • 1
  • 5
  • 8