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 got a 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="768" HEIGHT="512" BORDER="0" ALT="bee"> </IMG><BR/>'; and: $fhandle = @fopen("photo1.jpg","r"); $file_size = @filesize("photo1.jpg"); $test = @file_get_contents("photo1.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;
↧