Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I need to receive a base64 from url using $_GET and convert to an image ...how can I do this?
作为您的问题的解决方案,请尝试执行下面提到的代码片段假设名称为“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); } ?>