Click to See Complete Forum and Search --> : [RESOLVED] Parse .jpg as PHP


Carth
06-19-2009, 11:03 AM
I want PHP to parse a .jpg file. I only want it to happen in one directory.

How can I do this? Apache web server.

If I use httpd.conf then it will do it to all jpg files? I don't have root access anyway.

Can it be done with mod rewrite somehow? Or how can I do it?

Charles
06-19-2009, 11:05 AM
For the most part you just put the same config commands in a file named ".htaccess" in that directory.

Carth
06-19-2009, 11:27 AM
OK I will try.

Carth
06-19-2009, 12:17 PM
For some reason AddType was just causing it to give a download window with the PHP source.

Since there was only one file I want to be parsed like this, I managed to do it with

<Files filename>
ForceType x-mapp-php4
</Files>

(my server seems to want x-mapp-php4 rather than x-httpd-php or x-httpd-php4, dunno what the difference is).

:)