Upload and Rename File PHP Tutorial

In this tutorial you will learn that how to rename file when upload file to server to prevent new file overwrite an old file that exists in you server.

Overview

In this tutorial create 2 files 1. upload_rename.php and 2. upload_rename_ac.php.

Steps
1. Create file upload_rename.php.
2. Create file upload_rename_ac.php.
3. Create folder “upload” for store uploaded files.
4. CHMOD your upload folder to “777” by using your ftp software(change permission).

Create file upload_rename.php

View in browser

|—|——————— code ——————–|—|

Create file upload_rename_ac.php

|—|——————— code ——————–|—|

Leave a Reply

Your email address will not be published. Required fields are marked *