php-windows Digest 27 May 2012 09:22:49 -0000 Issue 4047

Topics (messages 30889 through 30889):

Characters in an uploaded text file being corrupted
        30889 by: Jacob Kruger

Administrivia:

To subscribe to the digest, e-mail:
        php-windows-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-windows-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-wind...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Using the following bit of code, I am then saving the contents of an uploaded 
text file into a mysql database, but, the issue seems to be that immediately 
after retrieving the contents of the temporary path of the uploaded file, for 
example, things like ' characters are rendering as ? characters in the assigned 
variable..?

//start of code segment
if (isset($_FILES["filContent"])) {
if ($_FILES["filContent"]["type"] == "text/plain") {
$ltContents = file_get_contents($_FILES["filContent"]["tmp_name"]);
}
}
//end of code segment

I am guessing that it's either due to something to do with upload part of 
process - form tag is using post method, and has enctype set to 
multipart/form-data - or else, it might have something to do with the server 
handling character encoding or something..?

This is currently being run/tested under WAMP, on a windows7 64 bit machine, 
FWIW.

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'

--- End Message ---

Reply via email to