Hi Guys, a quick one...
Im uploading files to file storage and placing the details into the database. Filename, filetype etc.
Just so that no two files of the same filename can be added to the filestorage, I am renaming the file upon submission. The new file will now consist of the module they are submitting to AND add a timestamp. For example: - builder.doc after submission is converted to computing-100312323.
My problem is that word documents and all non-html files now loose their extensions and my browser recgnises them as text files!
Any suggestions as to how to tweak my code to stop this?
$timestamp = time();
$filedir = "/program files/apache group/apache/htdocs/sis/primary/final/files/work/";
$filenamenew = strtolower(str_replace(" ", "", $module_title)) . "-" . $timestamp;
$filestore = $filedir . $filenamenew;