Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 26858

JPG and e.t.c are not displayed

$
0
0

I used PHP and Apache on Windows 7 without problems. I had a photo database for my own needs. But I changed my notebook to W8 and face the problem after.

With the transition to MS Windows 8 and IIS gota problem displaying photos. It displayed only photo frame. I tried it with different browsers and different PC with access to the site without any result. To test the problem, I wrote a simple code, which is also not working like in Apache.

echo '<IMG src="test.php" WIDTH="256" HEIGHT="384" BORDER="0" ALT="bee"> </IMG>';


the test.php is:

$fhandle = @fopen("photo1.jpg","r");
$file_size = @filesize("photo1.jpg");
$test = @file_get_contents("foto1.jpg");
header("Content-type: image/jpeg");
header("Content-length: {$file_size}");
header("Content-Disposition: attachment; filename=photo1.jpg");
header("Content-Description: PHP Generated Data");
echo $test;




Viewing all articles
Browse latest Browse all 26858

Trending Articles