Home arrow PHP arrow Merging a File Split for FTP Upload using PHP

Merging a File Split for FTP Upload using PHP

This is the second part of a tutorial on file splitting during an FTP upload. In this part, you will learn the details of file merging and implementation. The split PHP script was thoroughly discussed in the first part. It is highly recommended that you read that part to easily understand this one.

TABLE OF CONTENTS:
  1. Merging a File Split for FTP Upload using PHP
  2. Finding the file to be split
  3. The File Merging Script
  4. Implementation of the File Merging Script
By: Codex-M
Rating: starstarstarstarstar / 3
November 23, 2009

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

As discussed before, once all the split parts of the file have been uploaded to the FTP server, you can safely recombine them into one file again (this is the merging process) using the PHP file merging script.

Example: File splitting process

Before we start the merging process, let’s look at an actual example of the file splitting process.

Once the PHP File splitting script (splitthisfile.php) has been completed, you are ready to split your file by entering the file name and the FTP hosting server's maximum file upload limit.

You can download the splitthisfile.php script. It was fully explained in the first part.

Make a folder named “splitfolder” and place it in the local host root directory (path: C:xampphtdocssplitfolder). Within this folder, place the “splitthisfile.php.” Using a browser, type the following URL:

http://localhost/splitfolder/splitthisfile.php

For example, if the file name is “test.mp3” and the upload limit is 500 KB, enter these details in the form; it should be entered as in the screenshot below:



 
 
>>> More PHP Articles          >>> More By Codex-M
 

blog comments powered by Disqus
   

PHP ARTICLES

- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 4 - Follow our Sitemap

Dev Shed Tutorial Topics: