I store information in array because I do not want to display full path to video..
let's say you have on server something like this..
you can use list.php to get all sub-folders and files in video folder
<?php
function listFolderFiles($dir){
$ffs = scandir($dir);
foreach($ffs as $ff){
if($ff != '.' && $ff != '..'){
echo $ff. PHP_EOL;
if(is_dir($dir.'/'.$ff)) listFolderFiles($dir.'/'.$ff);}}}
listFolderFiles('video');
exit;
?>[/code:3rrvwo6w]
so..your ajax data will look like this:
[img="http://lookpic.com/O/i2/1364/e8EIVxSr.png"]
now you can loop through data and populate array and list object..
[url=https://app.box.com/s/nozesa4msrfq346aoohpq8ovmaicxvic]phpDir2List.capx[/url]
if you upload a new videos or delete..even sub-folders in [b]videos/video[/b] folder..
you do not have to make any changes in php script or C2 code...
Hello korbaach
I'm still stuck in this demo project. I had to give up the CSV because they don't want to include the data in this file manually. I need to read the files in the folder and create a list with these files and show or play a preview when the user select the item in the list. Can I use this kind of solution that you created for this? I know the php only works in the online projects. But I can use other solution than php?
Thanks in advanced