Perhaps the title did not clarify the essence of my question, so I'll start all over again. There is a folder, there is a script that loads files (images) into this folder. - it's all good. Next: there is a script that adds links to those files in MySQL. Here he is:
<?php include('mysql.php'); if ($handle = opendir('images')) { while (false !== ($file = readdir($handle))) { if($file!='.' && $file!='..') { $images[] = "('".$file."')"; } } closedir($handle); } $query = "INSERT INTO images (filename) VALUES ".implode(',', $images)." "; if (!mysql_query($query)) { print mysql_error(); } else { print "Изображение подтверждено!"; } ?>
Next I need your help, good people. I need the files to be loaded temporarily into one folder, indexed in MySQL, then moved to another directory forever, while further displaying correctly, because they will be removed from the temporary folder. I hope for your understanding :)