How can i edit .htaccess file to make client run php script, but in png/jpg extension. Soo... User will visit url
http://example.com/script.png and he will see "test"(php script will return this value), not image. That's what i already did: .htaccess file:
AddType application/x-httpd-php .png
script.png file:
<?php
header("Content-type: image/png");
echo 'test';
?>
What is wrong with this code? Why it doesn't work? Browser tries to download the image :/