PHPScript sample for JFileUpload
http://www.jfileupload.com

==========================================================
JFileUpload homepage:
http://www.jfileupload.com/products/jfileupload/index.html

JFileUpload add-ons homepage:
http://www.jfileupload.com/products/tools/index.html

Support forums:
http://www.jfileupload.com/support/forums/index.php
==========================================================

This add-on is a PHP server-side sample script for JFileUpload applet.
It supports basic upload, recursive folders upload and file recomposition
from uploaded chunks.


Install :
-------
1 - Copy process.php under your web server providing PHP support.

2 - Edit process.php and setup $upload_dir variable with the correct path 
    of folder where uploaded files will be stored.

3 - Optionally, setup $max_size variable (default is 1.5MB) to limit upload
    file size. Notice most default PHP configurations allow 2MB upload only. 
    - If you want to modify it then update your php.ini 
      (see upload_max_filesize).
    - If you cannot modify it then you could use "chunksize" parameter of 
      JFileUpload to ask the applet to split file in small chunks before
      upload. The PHP script will be able to recompose the original file from 
      chunks.

4 - Copy applet_http_php.html and applet_http_php.js in the same folder as 
    applet_http.html provided in JFileUpload package. Update both "url" 
    parameters  in applet_http_php.js to make them match to your server name. 
    Open applet_http_php.html in your browser.
    Note: This sample is setup to display PHP custom error messages (if any).


----------------
02/05/2012: v2.2
----------------
- CRC/MD5 support added for resume support.
- encoding variable added.


----------------
07/21/2008: v2.1
----------------
- "accountcreation" extra parameter support added.
- resume support added for HTTP PUT.
  (HTTP POST resume is experimental).
  See instructions at the end of this file.
  

----------------
02/25/2008: v2.0
----------------
- "overwrite" parameter support added through HTTP HEAD.


----
v1.2
----
- Quote support in filename bug fixed.
- process_debug.php script added for debugging purpose.


-----
v1.1a
-----
- HTML + Javascript sample updated.


----
v1.1
----
- emptydirectory support added.
- cancel bug fixed.
- JDiskExplorer support added.


----
v1.0
----
Initial release.


Notes for all PHP configurations:
--------------------------------
 If you experiment timeout or upload issues then check out the following
 PHP variables in your php.ini or with phpinfo():
 - file_uploads
 - upload_max_filesize
 - post_max_size
 - max_execution_time
 - max_input_time
 - memory_limit


Notes for IIS:
-------------
 Depending on how PHP is setup with IIS (CGI, FastCGI, ISAPI) you may
 need to uncomment //set_time_limit(0); at the top of process.php.
 For PHP/CGI with large upload you may need to increase CGI timeout:
  Go to inetpub/AdminScripts in a command line
  run "cscript.exe adsutil.vbs set w3svc/cgitimeout 6000"


Setup resume support with HTTP PUT:
----------------------------------
1 - Enable PUT upload and resume in JavaScript applet declaration:
    <PARAM NAME="param4" VALUE="httpmethod">
    <PARAM NAME="value4" VALUE="put">
    <PARAM NAME="resume" VALUE="true">

2 - Enable resume in process.php:
    Replace $resume = "false"; by $resume = "true";

3 - Make sure your web server allows HTTP PUT verb.
