I have a problem:
Trying to upload images to my LDAP server and need to convert the image to base64 to be stored. I'm trying to take the file from a form and do the base64_encode($upload_file) and put it in the server. When I do the following:
//File 1 is from a form the user submits.
$source = $file1;
$source_name = $file1_name;
$base64e = base64_encode($source); $base64d = base64_decode($base64e);
echo "$source_name has been uploaded<br>\n";
echo "$base64e<br>";
echo "$base64d<br>";
I get the following:
worldcom-logo.gif has been uploaded
L3RtcC9waHAwQzBIaFo=
/tmp/php0C0HhZ
this does not look like what I'm looking for. I'm not sure if I am taking the correct approach here, if anyone has some experience on this please give me some advice.
Any help, samples, links, etc is most appreciated. Thanks.
-Ray