Hi all you there...

I realized that when I try to upload a file of about 1MB or more, it doesn't
upload... Even changing all the max_limit stuff at the config files of
Apache and PHP... So, I don't now how to solve this.

In the form, there are:
<form enctype="multipart/form-data" name="frmUploadFile" action="upload.php"
<input type="text" name="strDesc" size="20" maxlength="50">
<input type="file" name="fileUpload" size="20">

In upload.php there are:
global $strDesc;
global $fileUpload;
global $fileUpload_name;
global $fileUpload_size;
global $fileUpload_type;

$fileHandle = fopen($fileUpload, "rb");
$fileContent = fread($fileHandle, $fileUpload_size);
$fileContent = addslashes($fileContent);

$dbQuery = "INSERT INTO myBlobs VALUES ";
$dbQuery .= "(0, '$strDesc', '$fileContent', '$fileUpload_type')";
db_query($dbQuery) or die("Couldn't add file to database");

With short files (up to 1MB aprox.), it works just perfect... But, more than
this, the variable $fileUpload_size, for example, is 0 (Zero)... So, anyone
know how to fix this? Thanks.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to