MMDE Posted January 12, 2011 Share Posted January 12, 2011 sure, I know how to output a picture with a php script. the problem is, the host I use, they won't let me edit the php.ini file to look through png files for PHP scripts before outputting. Of course, it is bad practice anyways... Is there any way to make it easy for a user to download the image with a .png extension instead of .php. (I know this is done automatically in windows 7, like: image.php.png because it reads the content type). Any good ideas? =) Link to comment https://forums.phpfreaks.com/topic/224166-image-script-output-workaround/ Share on other sites More sharing options...
BlueSkyIS Posted January 12, 2011 Share Posted January 12, 2011 use mod rewrite to rewrite .png to a .php file that returns the requested file name. Link to comment https://forums.phpfreaks.com/topic/224166-image-script-output-workaround/#findComment-1158404 Share on other sites More sharing options...
MMDE Posted January 14, 2011 Author Share Posted January 14, 2011 use mod rewrite to rewrite .png to a .php file that returns the requested file name. I have no access to the apache server to do that... or do I not need that? Link to comment https://forums.phpfreaks.com/topic/224166-image-script-output-workaround/#findComment-1159153 Share on other sites More sharing options...
BlueSkyIS Posted January 14, 2011 Share Posted January 14, 2011 you should be able to use .htaccess for mod rewrite http://www.google.com/search?client=safari&rls=en&q=mod_rewrite+.htaccess&ie=UTF-8&oe=UTF-8 Link to comment https://forums.phpfreaks.com/topic/224166-image-script-output-workaround/#findComment-1159209 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.