-3

I need to receive a base64 from url using $_GET and convert to an image ...how can I do this?

4

1 回答 1

0

作为您的问题的解决方案,请尝试执行下面提到的代码片段假设名称为“image_data”的参数被传递到查询字符串中

       <?php
           $image_file_path=$_SERVER['DOCUMENT_ROOT'].'/Scripts/images/img.jpg';
           $content=base64_decode($_GET['image_data']); 
            if(!empty($content))
            {
               file_put_contents($image_file_path);
            } 
       ?>
于 2013-05-31T16:17:11.467 回答