How to set the root folder for resolving included files path?

My web service folder structure looks like this:
service/client/index.php
service/server/the other .php project files

So all the includes I have in the "server" folder look like this:
require_once('../server/basket/c/AdmController.php');

IDE can't resolve this path. I think it uses the projects root. So, is there a way to set the root for includes?
(I'm using the latest EA build - 98.521)

2 comments
Comment actions Permalink

Good luck. There are so major problems in how these are resolved by PHPStorm.

http://youtrack.jetbrains.net/issue/WI-3125      

0
Comment actions Permalink

PhpStorm currently having problems understanding what ".." means : http://youtrack.jetbrains.net/issue/WI-4175?query=require_once

You can disable this inspection completely: Settings | Inspections | PHP | Unresolved include
or disable for particular include when possible (move your cursor to such statement, press Alt-Enter (or click on bubble icon) and choose "Suppress ..." if available).

There are some other ways (using include_path or autoloading functionality) but that is kind of wrong to do just to please PhpStorm.

0

Please sign in to leave a comment.