从html按钮运行脚本

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

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.