Error in Writing to Image file from PHP

前端 未结 4 1252
伪装坚强ぢ
伪装坚强ぢ 2021-01-19 06:23

I am attempting to write to an image file from a blob.

 if($_POST[\'logoFilename\'] != \'undefined\'){
  $logoFile = fopen($_POST[\'logoFilename\'], \'w\') o         


        
4条回答
  •  渐次进展
    2021-01-19 07:05

    If it's really a blob, you might want to trying using mode "wb" as the second parameter to your fopen() call.

    EDIT: You might also consider just using file_put_contents(), which is binary-safe.

提交回复
热议问题