Answer the question
In order to leave comments, you need to log in
How to get a file on the server from base64, that is, decode the code into base64 and move it to a folder on the server?
Guys, the file is sent in the post request in base64 format, the following line: data:;base64,UEsDBBQAAAAIAEYAN0bgiXMTficA.... etc.
But I need to re-encode the line of code into a file, which I can move to the desired directory, for example, download the prompt function. I know there is base64_decode but I can't use it to decode and create a file on the server.
Tell me how to do this. Thanks in advance!
Answer the question
In order to leave comments, you need to log in
$str = base64_decode($_POST['string']);
and then create the required file and write the data there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question