I tried uploading a text for using php, but the file somehow got deleted even before the script can move the file to the dir i want. during the upload the file is created in the /tmp folder, but once the upload is complete the file is gone.
filename - /tmp/phpL1frsT
filename_name - raynor[01-13-03]-MM.txt
filename_size - 108217
filename_type - text/plain
Warning: Unable to create '/home/s1asia/public_html/mp4/app_admin/attached_list/1043421649-raynor[01-13-03]-MM.txt': No such file or directory in /home/s1asia/public_html/mp4/app_register_form.php on line 513
Warning: Unable to move '/tmp/phpL1frsT' to '/home/s1asia/public_html/mp4/app_admin/attached_list/1043421649-raynor[01-13-03]-MM.txt' in /home/s1asia/public_html/mp4/app_register_form.php on line 513
Cannot copy file.
Below is the code i use
if ($filename_name != "") {
move_uploaded_file("$filename", "/home/s1asia/public_html/mp4/app_admin/attached_list/$regid-$filename_name") or die("Cannot copy file.");
$attached_list = "Y";
$attached_list_path = "/home/s1asia/public_html/mp4/app_admin/attached_list/$regid-$filename_name";
} else {
die ("No Input File");
}