D
D
DixFrey2016-01-29 19:57:24
PHP
DixFrey, 2016-01-29 19:57:24

How to upload an image to the server using PHP?

There is a tag: <img src="images/image.jpg">how to upload exactly this picture that is in the tag? Not through <input type="file">, namely the one in the tag?
PS Instead of images/image.jpg there is a link generated withtoDataURL();

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
IceJOKER, 2016-01-29
@IceJOKER

fi2.php.net/manual/ru/function.copy.php
fi2.php.net/manual/ru/function.file-get-contents.php

S
Sergey, 2016-01-29
@gangstarcj

Download from where and where?

Y
Yuri, 2016-01-29
@riky

1) display the image on a hidden canvas
2) generate a base64 code for the content of the canvas
3) add a hidden field and write its value to this code.
4) on the server it will be in the $_POST variable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question