How to access resources within application folder?

为君一笑 提交于 2020-01-17 04:31:06

问题


First of all, I am fully aware that a better implementation, putting resources folder alongside application (not inside), exists. So yeah.

Resources = js, css, images.

This is just really a requirement, so any ideas how? I tried it but it says 403 (Forbidden).


回答1:


This is one of the possible solutions you can use

/applications
    /resources
      .htaccess
.htaccess

.htaccess of applications folder contains Deny from all

(it is CI default. which is the reason you get 403 Forbidden)

now make an .htaccess inside resources folder and keep it Allow from all

(so you are just allowing the resources folder to be accessible)



来源:https://stackoverflow.com/questions/25197413/how-to-access-resources-within-application-folder

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!