PHP: UTF-8 kullanırken readfile kullanarak göstermek görüntü başarısız oldu

0 Cevap php

Im trying to use the php function 'readfile(path_to_image)' to dynamically display an image. While its working with php script file encoded as ANSI, it fails when the same script file encoded in UTF-8 (or even included in a file that uses UTF-8). Any idea how to solv this?

Üzgünüz, kod aşağıdaki gibidir:

header('Content-Type: image/jpeg');
readfile('C:\wbs\uploads\admin\Koala.jpg');

Ben dosya ANSI olduğunda UTF-8 olarak kaydederek, çalışır ve başarısız dediği gibi.

Thanks, David

0 Cevap