Genertating a File List SQL compatible
Posted: Mon May 01, 2006 3:36 pm
Hi all,
I was wondering if there was a way that i could get the results that come from the reading of directories to the screen put with their location and file size. I then would like to export this and put it into a database that can be searched with all of the file names. I was going to use this code to get all of the file names:(From the php.net site)
I then want to make this into a format that can be imported with phpmyadmin? Has anyone made a class/function or something that can do this or can any suggestions be made? (Would anyone also be able to tell me how to list the location of the file from the root (/) of the drive?
Thanks
I was wondering if there was a way that i could get the results that come from the reading of directories to the screen put with their location and file size. I then would like to export this and put it into a database that can be searched with all of the file names. I was going to use this code to get all of the file names:
Code: Select all
<?php
foreach (glob("*.mp3") as $filename) {
echo "$filename size " . filesize($filename) . "\n";
}
?>I then want to make this into a format that can be imported with phpmyadmin? Has anyone made a class/function or something that can do this or can any suggestions be made? (Would anyone also be able to tell me how to list the location of the file from the root (/) of the drive?
Thanks