Jump to content

[SOLVED] exec function


maxic0

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/46376-solved-exec-function/
Share on other sites

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.

 

Link to comment
https://forums.phpfreaks.com/topic/46376-solved-exec-function/#findComment-225564
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.