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

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.