How save image from canvas tag to php server?

前端 未结 3 1321
无人共我
无人共我 2021-01-06 05:22

I have a javascript code like this

var testCanvas = document.getElementById(\'canvas-1\');
var canvasData = testCanvas.toDataURL(\"image/png\");
var ajax = n         


        
3条回答
  •  走了就别回头了
    2021-01-06 05:58

    According to a comment in the manual, to get the HTTP_RAW_POST_DATA, you need to do something like this:

     
    

    The manual says this about the wrappers such as php://input:

    In the case of POST requests, it is preferable to use php://input instead of $HTTP_RAW_POST_DATA as it does not depend on special php.ini directives.

提交回复
热议问题