intellij-idea - PHPStorm 中的 'Resource Root' 名称是什么?就此而言,PHPStorm 认为什么是资源?

标签 intellij-idea phpstorm webstorm jetbrains-ide

也许我很厚,但我无法理解在 PHPStorm 中创建项目时“资源根”按钮/名称的用途。看了the PHPStorm documentation on the topic ,我发现的唯一解释是以下内容的变体:

"Resource Root: By assigning a folder to this category, you tell PhpStorm that files in it and in its subfolders can be referenced relative to this folder (instead of specifying full paths to them). These folders are marked with the icon [purple directory]."



那不能回答我的问题。

最佳答案

我可以轶事地回答 URL 路径将在适用的情况下根据“资源根”进行解析。例如,在 HTML <a href="..."> 中或 <img src="...">元素,根据资源根查找相对 URL。当您开始在 href 中输入时或 src属性,自动完成将建议这些目录中的项目,无法解析的 URL 将有助于标记为警告。

关于intellij-idea - PHPStorm 中的 'Resource Root' 名称是什么?就此而言,PHPStorm 认为什么是资源?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24852739/

相关文章:

dart - 为什么删除我的 web/assets 文件夹也会删除 lib 中的所有源?

localhost - Rubymine(Jetbrains) 本地服务器。我可以让它从本地主机根运行吗?

laravel - PhpStorm:无法分析 webpack.config.js:编码帮助将忽略此文件中的模块解析规则

java - 在 IDEA 中,如何为 javadoc 链接启用自动导入?

java - 使用 JAVA 在 CSV 文件中创建列

java - IntelliJ 没有注意到界面的变化?

ide - PHPStorm Live 模板未扩展

PHPStorm - 绑定(bind)键盘快捷键来关闭当前文件

javascript - 如何使像 VSCode 或 WebStorm 这样的 JavaScript IDE 在代码完成方面像 Eclipse 一样智能?

android-studio - 构建应用程序时出现 IndexNotReadyException