Failed to load the resource: the server responded with a status of 403 (Forbidden), including css files and js libraries

I am starting to develop using codeigniter, and I am doing a few mostly things to find out on localhost using easyphp (I get an error with WAMP Server).

I create the folder "libraries / js / jquery-1.9.0.min.js" and "views / templates / css / style.css" and I just include the files in the header:

<link type="text/css" href="application/views/templates/css/style.css" rel="stylesheet" /> <script type="text/javascript" src="application/libraries/js/jquery-1.9.0.min.js"></script> 

And the server returns me the following errors:

 GET http://127.0.0.1:8887/CodeIgniter_2.1.3/application/libraries/js/jquery-1.9.0.min.js 403 (Forbidden) GET http://127.0.0.1:8887/CodeIgniter_2.1.3/application/views/tamplates/css/style.css 403 (Forbidden) 

I was looking for information and it could be a permission problem in files, but it has never happened to me before ... and on a remote server I can access via ftp and change the resolution, but how can I do this on localhost? If this is a problem ..

Thanks in advance!

+4
source share
3 answers

I found a solution here:

Where to place image files, css, js, etc. in Codeigniter?

All people put these files outside the codeigniter framework, I do it and now it works.

Thanks for the help.

PD: Now I'm fighting the creation of an assistant: D

+2
source

If you are using macOS, simply right-click on the folders where your js and css files are located, then click on “Get Information” and check the “Shared Folder” box.

-1
source

All Articles