Hello I installed MediaInfo in my server (http://mediainfo.sourceforge.net/) and I'm creating a PHP script for executing it. But I'm stuck at the action button. The button doesn't work, it does anything. I think it is for a naming problem. Here's the code: <?php if ($handle = opendir('files')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "$file<br/>"; } } closedir($handle); } if (isset($_POST["cap"])) { exec("mediainfo --output=html --logfile=/var/www/html/files/hello.html /var/www/html/files/*.mp4"); echo "<h5>Done.-</h5>"; } echo ('<input type="submit" style="font-size:16px; font-weight:bold; cursor:pointer;" select name="cap" value="Capture"/></div></div>'); ?> PHP: Any help will be grateful. Thanks neox182
I'm not familiar with the program but I can see your button needs <form> tags so try this: echo ('<form action="#" method="post"><input type="submit" style="font-size:16px; font-weight:bold; cursor:pointer;" select name="cap" value="Capture"/></form></div></div>'); PHP:
I guess you need to set the proper path there inside the exec! Do one thing, make a file with name dirname.php and put the following code inside <?php echo dirname(__FILE__); ?> PHP: Now place that file inside the same folder where the script having the code mentioned by you, or hello.html resides! Now run the dirname.php from your browser and note the output! It might be something like [B]/home/yourdoma/public_html/yoursite/bla[/B] Code (markup): Now note this path info from the exec... [The bolded part] exec("mediainfo --output=html --logfile=[B]/var/www/html/files/[/B]hello.html [B]/var/www/html/files[/B]/*.mp4"); Code (markup): Replace those parts with the output you got before! I am not sure about this, but this is worth a try!