简体   繁体   English

PhpStorm-CSS文件链接到服务器的根目录而不是项目根目录

[英]PhpStorm - CSS files link to root of server and not project root

Basically I'm trying to run a HTML file in PhpStorm on localhost. 基本上,我试图在localhost上的PhpStorm中运行HTML文件。

My issue is the fact that my CSS file have paths relative to the root of the server (as they should) but in PhpStorm another folder is automatically added for the project. 我的问题是我的CSS文件具有相对于服务器根目录的路径(应如此),但是在PhpStorm中会自动为该项目添加另一个文件夹。

In short, my CSS files link to: 简而言之,我的CSS文件链接到:

localhost:port/css/style.css

While PhpStorm makes the location be: 虽然PhpStorm将位置设置为:

localhost:port/projectname/css/style.css

How do I fix this? 我该如何解决?

Thanks! 谢谢! -Jamie -杰米

如果要更改内置Web服务器上的默认Web路径,则必须通过相应地编辑系统主机文件来重新配置服务器-请参阅http://youtrack.jetbrains.com/issue/WEB-8988#comment = 27-577559

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM