Answer the question
In order to leave comments, you need to log in
How to convince PHPStorm to resolve relative paths to files?
The PHP project structure is visible in the figure.
/index.php - the main script
itself /ext_addons/css/... - css files are
located here /view/_general.tpl - this is a smart template. It has a link href="ext_addons/css/...
When I run index.php, the link works. But PHPStrom doesn't know about it and keeps warning me.
I can't change the path to be relative to the root of ext_addons/css/... -> / ext_addons/css/... because I want the script to work when placed in any directory
Is there any way I can change the behavior of phpstorm so that it checks files normally I don't want to disable/suppress the check.
Answer the question
In order to leave comments, you need to log in
Try to mark the root folder where "ext_addons" is located:
*rightclick* > Mark Directory As > Resource Root
Got a response from JetBrains.
no, there is currently no way to get these paths resolved. Please feel free to file a request for this enhancement to youtrack. Related ticket: youtrack.jetbrains.com/issue/WEB-11660
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question