php - 在我的 index.php 中加载 CSS 和 JS 等资源时出现错误 403

标签 php css linux directory lampp

我在 Linux Elementary OS 中,并在 opt. 中安装了 lampp。

我的 CSS 和 JS 无法加载。当我通过浏览器检查我的页面时。控制台说 加载资源失败:服务器响应状态为 403(禁止) 我真的很确定我的目录是正确的。 This is my workspace

这是错误 enter image description here

enter image description here

最佳答案

您需要更改文件夹 bootstrap/css 的权限。 您的 super 用户可能可以访问它,但这并不意味着 apache 或 nginx 可以访问它,这就是您仍然需要更改权限的原因。

提示:我通常将 apache/nginx 的用户组设为该类文件夹的所有者,并授予 775 权限。

关于php - 在我的 index.php 中加载 CSS 和 JS 等资源时出现错误 403,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18724718/

相关文章:

jquery - 滑动时隐藏div外的绝对元素

linux - 从 Windows 复制到 Linux 时保留权限

c - 我如何在 Linux 上覆盖根文件系统?

php - 在 ubuntu 中安装 Yii2 高级模板

php - 网页上的照片破裂

php - 在 select 上锁定 mysql 数据库表行

html - 无法在 iOS 设备上使用 iFrame 选择文本 (webkit)

php - 我的网站无法识别运行 ghost css 脚本的 css 文件

PHP cURL 缺少一些响应 cookie

c - 在 C 中使用 string.h 字符串对象时出错