skibascott
IS-IT--Management
When a user selects a document, I need a list of videos that correspond with the selected doc. The document number is exactly the same as the first part of the filenames of the videos. Here is my code:
My goal right now is simply to display a list video files that have filenames corresponding to the selected document. The output of the above code does not display the matches. Any suggestions?
Thank you.
Code:
<?php
$list = "cd /mnt/sc_proc/video; ls *.wmv | sort"; //list of video clips
exec($list,$file_list);
$phpdocnum = $_POST['PHPdocNum'];
$phpdocnumtitle = $_POST['DocNum']; for($i=0; $i<count($file_list); $i++){
$strlength = strlen($phpdocnum);
if ($phpdocnum == substr($file_list[$i],0,$strlength)){
echo $file_list[$i];
}else{
}
}
?>
My goal right now is simply to display a list video files that have filenames corresponding to the selected document. The output of the above code does not display the matches. Any suggestions?
Thank you.