ERROR 403 in loading resources like CSS and JS in my index.php(在我的 index.php 中加载 CSS 和 JS 等资源时出现错误 403)
问题描述
我使用的是 Linux、Elementary OS,并在 opt 中安装了 lampp.
I'm in Linux, Elementary OS, and installed lampp in opt.
我的 CSS 和 JS 无法加载.当我通过浏览器检查我的页面时.控制台说加载资源失败:服务器响应状态为 403(禁止)我真的很确定我的目录是正确的.
My CSS and JS won't load. When I inspect my page through browser. The console says Failed to load resource: the server responded with a status of 403 (Forbidden) I'm really sure that my directories are correct.
这是错误
推荐答案
您需要更改文件夹 bootstrap/css 的权限.您的超级用户可能可以访问它,但这并不意味着 apache 或 nginx 可以访问它,这就是您仍然需要更改权限的原因.
You need to change permissions on the folder bootstrap/css. Your super user may be able to access it but it doesn't mean apache or nginx have access to it, that's why you still need to change the permissions.
提示:我一般都是把apache/nginx的用户组设为那种文件夹的所有者,并给它775的权限.
Tip: I usually make the apache/nginx's user group owner of that kind of folders and give 775 permission to it.
这篇关于在我的 index.php 中加载 CSS 和 JS 等资源时出现错误 403的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在我的 index.php 中加载 CSS 和 JS 等资源时出现错误 403


- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- PHP - if 语句中的倒序 2021-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01