0

I have a button in html:

<a  class="btn btn-sm btn-danger"><i class="ace-icon fa fa-reply"></i>Reset CM</a>

and an angular variable: "{{product.name}}"

and I like to run this command with this button:

./cm-reset2.sh -r 172.31.31.10 -k hk15#inhp -m {{product.name}}

any idea about how do it? I can“t move the file from html to php.

Thanks

user5071535
  • 1,312
  • 8
  • 25
  • 42
roghax85
  • 23
  • 5

1 Answers1

0

You can have a route defined, say "/run_command" which you call (through ajax probably, post/get depending on if you are expecting some response data) and from your php handler you can do s shell_exec and run the required script.

CodeWithPride
  • 123
  • 3
  • 14