久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      如何解決在php用gd庫輸出圖片到微信瀏覽器出現(xiàn)亂碼

      如何解決在php用gd庫輸出圖片到微信瀏覽器出現(xiàn)亂碼

      如何解決在php用gd輸出圖片到微信瀏覽器出現(xiàn)亂碼?

      程序如下:

      <?php $im = imagecreate(200, 300); $white = imagecolorallocate($im, 8, 2, 133); imagegif($im);  ?>

      在瀏覽器輸入PHP文件的地址之后,發(fā)覺顯示如下亂碼:

      如何解決在php用gd庫輸出圖片到微信瀏覽器出現(xiàn)亂碼

      經(jīng)過進(jìn)一步的學(xué)習(xí),才發(fā)現(xiàn)用GD庫創(chuàng)建的圖像,要使用函數(shù)header('content-type:image/gif');指定以哪一種的格式進(jìn)行輸出,不指定就會亂碼。

      修改后的代碼如下:

      <?php // header('content-type:image/gif'); $im = imagecreate(200, 300); $white = imagecolorallocate($im, 8, 2, 133); header('content-type:image/gif'); imagegif($im);  ?>

      修改后圖片顯示如下:

      如何解決在php用gd庫輸出圖片到微信瀏覽器出現(xiàn)亂碼

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號