I must edit an php-file - but the ending is .jpg
Hi,
I need a dynamic picture - it must be .jpg. So I have a directory where the server will parse .jpg.
But now I can't edit that file in PHPstorm (intellij 138.1980.1). Is it possible to edit .jpg like php-file (in fact it is php) - but only in ONE directory (because in all other directories of course the .jpg - Files are real .jpg files)
cu
Please sign in to leave a comment.
You can tell the IDE to treat this file as PHP - in Settings/File Types/PHP Files (PHP) add <your file name>.jpg to registered patterns list
Hi,
yes, thank you - but is it possible to do that just for one directory - or just for one project?
cu
Don't understand what you mean by doing it for one directory... Do you mean that you have same-named .jpg files in different folders, and like to treat foo.jpg in one folder as PHP and foo.jpg in another one - as JPG?
Hi,
I want the IDE to treat all jpg-Files like jpg-files - EXCEPT in on folder.
In this folder is an .htaccess file:
No -- "Settings | File Types" is an IDE-wide setting that affects ALL projects.
Better use URL-rewriting capabilities of your web-server (or routing mechanism of your framework) and redirect requests to such .jpg files to a .php file.