Home arrow PHP arrow Page 2 - File Version Management in PHP

File Version Management in PHP

PHPWe can find many articles related to uploading, viewing, and downloading files. Murali's latest article is written on the basic concept of uploading and managing files, and shows us how to create a magic with a little PHP and MySQL. Learn how to properly manage duplicate files through versioning.

Author Info:
By: Murali Dharan
Rating: 4 stars4 stars4 stars4 stars4 stars / 51
December 08, 2003
  1. · File Version Management in PHP
  2. · Program Plan
  3. · Let's Build It
  4. · Let's Build It, Cont'd.
  5. · Conclusion

print this article

File Version Management in PHP - Program Plan
(Page 2 of 5 )

I drafted a plan on what is needed for this file version management program. Below are some features:

  1. When a user uploads a file for the first time, the system should upload the file in the specified folder and insert the file details like file name, size, and type in the database table.
  2. When the user uploads a file for the second time (the filename has to be the same), the system will compare the size, date and time of the existing file and of the file being uploaded, and automatically assign a new version for the uploaded file if there is a difference. If there is no difference, then the existing file will be retained and a message will be displayed for the user.
  3. A check box allows the user to replace the existing file. Clicking this option will replace the exiting file. Note that only the latest version of the file can be replaced in this case, and not an older one.
  4. The database will maintain file list and version details. Users should be able to view all the versions of a file and download the required version.
  5. While displaying the file list, the program displays all the versions of files under one name. For example, if the file name is xyz.doc and its other versions are xyz_VERSION1.doc, xyz_VERSION2.doc, xyz_VERSION3.doc, xyz_VERSION4.doc, xyz_VERSION5.doc and so on. The program will display filename as xyz.doc for all the versions.
  6. The program allows users to delete the file. Clicking on delete will ask for confirmation before proceeding.

blog comments powered by Disqus

- Removing Singletons in PHP
- Singletons in PHP
- Implement Facebook Javascript SDK with PHP
- Making Usage Statistics in PHP
- Installing PHP under Windows: Further Config...
- File Version Management in PHP
- Statistical View of Data in a Clustered Bar ...
- Creating a Multi-File Upload Script in PHP
- Executing Microsoft SQL Server Stored Proced...
- Code 10x More Efficiently Using Data Access ...
- A Few Tips for Speeding Up PHP Code
- The Modular Web Page
- Quick E-Commerce with PHP and PayPal
- Regression Testing With JMeter
- Building an Iterator with PHP

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials