I have the following snippet of the code:
<html>
<head>
<title>Example of Very First PHP Script ever!</title>
</head>
<body>
<script>
function comexe(){
C:\Program Files\Notepad++\notepad++.exe C:\Documents and Settings\User\Desktop\file.txt
}
</script>
<a href="return false;" onclick="comexe()">music</a>
</body>
</html>
How can I run another program from the HTML? What am I doing wrong?
Adding this as an answer, as requested in the comments
You can't - HTML is client side, and javascript is sandboxed to protect the client PC from exactly this. Apart from the title, your script has nothing to do with PHP - which can run a filesystem command, but only on the server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With