I'm actually creating a Android application where i'm using the volley API
to send request to a server .
My problem is while uploading an image compressed as String to the server i receive an error message from file_put_contents()
saying that :
failed to open stream permission denied in
What i did i change the permission of the directory to 777 (not safe ) but it still doing the same thing
Im using a vps as server to test my webservice . here is my code :
$name = $allPOstVariables['imageName'];
$fileContent = $allPOstVariables['imageFiles'];
$target_dir = "../storage/"+$name;
$decoded_images = base64_decode("$fileContent");
file_put_contents($target_dir,$decoded_images,FILE_APPEND);