Rename file

See all posts See thread Reply

Re: Rename file new!
by colin, 13 years, 8 months ago
I already answered you here.

If you read $_FILES['image']['name'], you have the complete filename, including the extension. You shouldn't use $_FILES anyway.

Please read the documentation. You can for instance use file_src_name to get the originale filename without the extension. Then your code can for instance be:
$foo->file_new_name_body = 'small_'.time().'.'.$foo->file_src_name;

As for the database, as I said in my previous answer, it is outside of the scope of this forum.Reply