How to start a PHP script using a jpeg / png as an extension?

1

What I do is the following I create a .php that will have as an extension .png or .jpg which is supposed to show the image, but does not show me anything:

<?php
header("Content-type: image/png");
echo "<img src='".$valor."logo.jpg' border='0' width='300' height='100'>";  
echo 'test';
?>

Then I put in my .htaccess the following:

AddHandler application/x-httpd-php .png
AddType application/x-httpd-php .png

But when I open my image .png the first thing does not show me the image uploaded to my server, so my PHP does not start, for example:

link

The other image would be logo that is the following:

the image

How could I make my PHP run with the% .png or .jpg extension? Since it seems that it does not.

And second show the image.

Image of the server:

The hidden .htaccess:

    
asked by Sergio Ramos 26.02.2017 в 13:41
source

0 answers