D. Glow
D. Glow

Reputation: 61

PhpStorm warning - Cannot resolve directory - a href without file extension

I have PHP files and a href links that lead to these files but without the file extension. PhpStorm outputs the messages "Can not resolve directory. This inspection checks unresolved file references". Example:

File path: /account.php
<a href="/account/">...</a>

Is in PhpStorm any setting to resolve this problem?

Upvotes: 6

Views: 4809

Answers (2)

Caco
Caco

Reputation: 1654

New versions of PhpStorm can map Resources directories (Resource root) as well as other types (Tests, Sources, Excluded). Go to File > Settings > Directories (GNU/Linux, Windows), or PhpStorm > Preferences > Directories (Ctr+Alt+S) and select your Resource root directory.

See https://www.jetbrains.com/help/phpstorm/2016.3/directories.html (as 2016.3 is the current version at time).

Upvotes: 9

Xiaobei Song
Xiaobei Song

Reputation: 151

Preferences > Editor > Inspections > HTML > inspections > File reference problems [disable]

Upvotes: 2

Related Questions