You just need to set up your PhpStorm project correctly by specifying the include paths that PhpStorm should use to resolve the links.
Go to File → Settings → PHP.
There you should add the project root directory (the one where your index.php is located) to the list of included paths.
When this is done, PhpStorm should allow the path in require_once('private/module2.php') .
Alternatively, you can add the private directory to the list of included paths. PHP uses through set_include_path () somewhere in you index.php . Then you can just call require_once('module2.php') from your module1.php .
Again, you will need to add the private directory to the list of included paths used by PhpStorm to allow this link.
panos source share