mariam Posted June 20, 2011 Share Posted June 20, 2011 hey I want my website to launch a java program (. jar file) stored in C:programfiles/livegraph etc. Any idea on how to go about it. I've been googling it to no avail. Quote Link to comment https://forums.phpfreaks.com/topic/239891-call-a-program-stored-in-my-hard-disk-from-my-website/ Share on other sites More sharing options...
AMcHarg Posted June 20, 2011 Share Posted June 20, 2011 As far as I am aware it's impossible. For what reason do you want to do it anyway? Quote Link to comment https://forums.phpfreaks.com/topic/239891-call-a-program-stored-in-my-hard-disk-from-my-website/#findComment-1232252 Share on other sites More sharing options...
Adam Posted June 20, 2011 Share Posted June 20, 2011 Provided the Apache user has the correct permissions to do what you want to do, you can execute shell commands on the server like you would through a terminal. Take a look at shell_exec. There's actually a variety of functions you can use to execute the commands, all differing slightly; system, exec, passthru. Plus other methods I'll not get into right now. Quote Link to comment https://forums.phpfreaks.com/topic/239891-call-a-program-stored-in-my-hard-disk-from-my-website/#findComment-1232260 Share on other sites More sharing options...
AMcHarg Posted June 20, 2011 Share Posted June 20, 2011 Provided the Apache user has the correct permissions to do what you want to do, you can execute shell commands on the server like you would through a terminal. Take a look at shell_exec. There's actually a variety of functions you can use to execute the commands, all differing slightly; system, exec, passthru. Plus other methods I'll not get into right now. But it can't be done directly on one of his web pages? Quote Link to comment https://forums.phpfreaks.com/topic/239891-call-a-program-stored-in-my-hard-disk-from-my-website/#findComment-1232277 Share on other sites More sharing options...
Adam Posted June 20, 2011 Share Posted June 20, 2011 Err.. I'm not entirely sure what you mean by that. The commands on the server will be executed at the same time as the rest of the PHP code..? Quote Link to comment https://forums.phpfreaks.com/topic/239891-call-a-program-stored-in-my-hard-disk-from-my-website/#findComment-1232283 Share on other sites More sharing options...
KevinM1 Posted June 20, 2011 Share Posted June 20, 2011 Err.. I'm not entirely sure what you mean by that. The commands on the server will be executed at the same time as the rest of the PHP code..? I think they want a Java applet to run on the user's screen when someone interacts with a PHP-driven web page. Quote Link to comment https://forums.phpfreaks.com/topic/239891-call-a-program-stored-in-my-hard-disk-from-my-website/#findComment-1232286 Share on other sites More sharing options...
Adam Posted June 20, 2011 Share Posted June 20, 2011 Err.. I'm not entirely sure what you mean by that. The commands on the server will be executed at the same time as the rest of the PHP code..? I think they want a Java applet to run on the user's screen when someone interacts with a PHP-driven web page. Ah, that would actually make more sense. I was thinking along the lines of a servlet Quote Link to comment https://forums.phpfreaks.com/topic/239891-call-a-program-stored-in-my-hard-disk-from-my-website/#findComment-1232290 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.