maxic0 Posted April 10, 2007 Share Posted April 10, 2007 Hey, Iv tried using this exec function and iv never used it before today.. im not completely sure what it does. <?php $command = "/movie/Without a Paddle.avi"; echo exec($command); ?> I hoped that this script would open up a movie, but it doesnt. I am using this function completely wrong or is there a problem with my code? I dont get an error. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/46376-solved-exec-function/ Share on other sites More sharing options...
s0c0 Posted April 10, 2007 Share Posted April 10, 2007 I may be wrong be don't you need to specify the true command that will open the movie? For example <?php $command = "moviecommand /movie/Without a Paddle.avi"; exec($command); ?> Also notice I removed the echo from infront of exec. I don't think you can echo a function. So maybe first try w/o the echo, then explore a command that will actually open the movie. Quote Link to comment https://forums.phpfreaks.com/topic/46376-solved-exec-function/#findComment-225564 Share on other sites More sharing options...
fert Posted April 10, 2007 Share Posted April 10, 2007 I don't think you can echo a function yes you can, but anyways the exec function will not open a window for the program Quote Link to comment https://forums.phpfreaks.com/topic/46376-solved-exec-function/#findComment-225567 Share on other sites More sharing options...
maxic0 Posted April 10, 2007 Author Share Posted April 10, 2007 How would i get it to just open up the movie on my page? The other one doesnt work. Thanks guys. Quote Link to comment https://forums.phpfreaks.com/topic/46376-solved-exec-function/#findComment-225574 Share on other sites More sharing options...
fert Posted April 10, 2007 Share Posted April 10, 2007 How would i get it to just open up the movie on my page HTML Quote Link to comment https://forums.phpfreaks.com/topic/46376-solved-exec-function/#findComment-225575 Share on other sites More sharing options...
maxic0 Posted April 10, 2007 Author Share Posted April 10, 2007 I cant do it in PHP? Quote Link to comment https://forums.phpfreaks.com/topic/46376-solved-exec-function/#findComment-225576 Share on other sites More sharing options...
fert Posted April 10, 2007 Share Posted April 10, 2007 PHP is server side, even if you could open a program with a window in PHP it would only play on the server Quote Link to comment https://forums.phpfreaks.com/topic/46376-solved-exec-function/#findComment-225577 Share on other sites More sharing options...
maxic0 Posted April 10, 2007 Author Share Posted April 10, 2007 Ok thanks for your help. Quote Link to comment https://forums.phpfreaks.com/topic/46376-solved-exec-function/#findComment-225579 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.