dongmei9508
2013-05-14 21:57 阅读 41
已采纳

file_get_contents不适用于图像WAMP php 5.3.13


  echo file_get_contents("result.png"); 

allow_url_fopen = On


php 5.3.13 raw data

?PNG  \0\0\0 IHDR\0\0\02\0\0\0f\0\0\0? ?P\0\0?IDATx^?y?]?u??????Rk
r??\\?\"?l??]?W

php 5.2.6(work fine) raw data

?PNG  IHDR2f? ?P?IDATx^?y?]?u??????Rk 

r??\?"?l??]?W

php 5.2.6 => php 5.3.13
=>\0
\ => \
" => \"

so i removed \0 ,
replaced \\ with \
and \" with " but it's doesn't solve the problem.
thank you for any suggestion.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    doulai2025 doulai2025 2013-05-14 21:59

    It's magic (you should disable that setting).

    点赞 评论 复制链接分享

相关推荐