Tomcat配置php无法加载css

Tomcat配置php无法加载css

问题描述:

在index.php文件中引入CSS:

<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">


在Chrome浏览器无法显示css的效果,打开调试后看到:

Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/myphp/vendor/bootstrap/css/bootstrap.min.css".

但如果按照html的格式打开文件就可以看到css的效果


    也试过网上说加___STATIC___的方法,但是没有用。这些代码我只使用了php和html、css,没有使用java和servlet等,那请问怎么解决?

href中路经改成绝对路经试下,href="http://localhost:8080/myphp/vendor/bootstrap/css/bootstrap.min.css"