Can somebody help me out, it's been bothering me for 2 days now and still can't find the solution.
My problem is this, I need to convert the code below so that it stores $data[] as a blob to a MySQL database instead of writing to a file.
$fp = fopen( $fileName, "wb" );
for ( $i = 0; $i < $dataLen; $i++ )
fwrite( $fp, chr( $data[$i] ), 1 );
fclose( $fp );
I changed the above code to the code below but it returned a different result than from the code above.
$dataString = "";
for ( $i = 0; $i < $dataLen; $i++ )
$dataString .= chr($data[$i]);
I don't know why, but I think it has something to do with the length argument of fwrite().
Thanks in advance.