PHP

 
 
PHP (= Hypertext Preprocessor) is an HTML-embedded server-side scripting language.

PHP is distributed at no charge for commercial or non-commercial use. For more information read the LICENSE information.

More information about PHP can be found at: http://www.php.net

PHP manuals can be found at:
http://www.php.net/manual/en/
http://devzone.zend.com/manual/

The latest PHP version can be downloaded from: http://www.php.net/downloads.php







Increase upload file size



Information
You can upload files with your browser:

<form name="inputForm" id="inputForm" method="post" action="upload.php" enctype="multipart/form-data">
:
<input name="uploadfile" id="uploadfile" size="45" type="file">
:
</form>


The file size you can upload depends if your php code limits the uploaded file size :

$file_tmp = $_FILES['uploadfile']['tmp_name'];
$file_name = $_FILES['uploadfile']['name'];
$file_size = $_FILES['uploadfile']['size'];

if($file_size > 102400) {
   echo "Uploaded file too large.";
}


but also what is set in the php.ini file.

Operating system used
Windows Vista Home Premium SP 1

Software prerequisites
PHP 5

Procedure
  1. To upload files to max 800MB, change your code:

    if($file_size > 838860800) {
       echo "Uploaded file too large.";
    }


  2. Edit file c:\WINDOWS\php.ini. Change the following lines into:

    upload_max_filesize = 800M
    post_max_size = 800M


  3. Restart Apache.