I'm using file put content to save my image to the server, but I get an error and the image is not saved .
I am getting the base64
string from android app, I decode it and pass it on for saving. My php script is in this location (example):
www.aaa.com/test
I want to save the photos to:
www.aaa.com/test/photos
What I have:
$name = "image123.png";
$data = base64_decode($fldPostPhoto);
file_put_contents("photos/".$name,$data);