HomePHP 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.
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:
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: