Use PHP glob() function to get all files from a folder
$files = glob(directory_path."/*"); // get all files in a folder
// Loop through array of fetched files and insert into database.
foreach ($files as $file) {
$filename = basename($file);
// WRITE YOU MySQL code here that inserts filenames into DB
}
0
solved filenames to mysql database [closed]