How to give the uploaded file a unique filename in php and show it in original name code example Example: create unique filename php $filename = uniqid(rand(), true) . '.pdf';