PHPBuilder - File Version Management in PHP

RSS Twitter

File Version Management in PHP

by: M. Murali Dharan
January 14, 2004


We can find many articles related to file upload, view, download, etc. This article is written on this basic concept of uploading and managing files. File upload is a process of copying the file from your machine to the remote server. Other users of the system then share this file by viewing / downloading. What happens when I upload a file that already exists in the remote folder to which you are uploading? While discussing this problem, various other issues arises, such as:

  • Should the program allow the user to restore this file or retain the existing file?
  • If the file exists, then should I copy the file as a new version?
  • How do I manage files if the user uploads files of same name and type more than once?

This article gives you a solution for all the above problems and also I hope this article will be useful for you to integrate in your projects.

This article is developed with the following versions of Apache, PHP and MySQL:

  • Apache - 1.3.23
  • MySQL - 3.23.48
  • PHP - 4.1.1

Operating System: Windows Professional


To understand this article, you should have a fair knowledge of PHP. To run examples given in your machine, you need Apache, PHP, and MySQL software installed and configured.

Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

M. Murali Dharan



(Maximum characters: 1200). You have characters left.