Home arrow PHP arrow Page 2 - Merging a File Split for FTP Upload using PHP

Finding the file to be split - 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

Sometimes it is difficult to detect the exact file name and extension. In that case you will need to use the Windows DOS command prompt and navigate to the XAMPP htdocs directory.

For example, if the file to be split is located in C:xampphtdocssplitfolder in your Windows-based operating system, go to Start -> Run -> and type CMD in the DOS prompt. After that, type EACH of the following commands to navigate to the split folder and then press ENTER:

CD (press enter)

CD XAMPP (press enter)

CD htdocs (press enter)

CD splitfolder (press enter)

DIR (press enter)

At the end of this command, you will see the list of files inside the “splitfolder” directory:

It confirms that the exact file name and extension is “test.mp3.”

Use this method to find the exact file name and file name extension.

After everything is set, click the button labeled “Split this large file into parts which is less than file upload limit.”

The file is automatically split into parts, and this will be displayed on the form. You will get a message telling you that the file has been split successfully. You will also be given details which you'll need to use when you merge the files. In our example, the filename to be used for merging should be test.mp3, and the number of parts after the split should be 12.

The script gave the 12 parts that were created by the split the filenames  splited_0, splited_1, splited_2, etc. These can be found in the split folder directory. At this stage, the file splitting process is complete.



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

blog comments powered by Disqus
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- 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...

Developer Shed Affiliates

 



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

Dev Shed Tutorial Topics: