Codeigniter assets folder best practice

后端 未结 3 809
我寻月下人不归
我寻月下人不归 2020-12-01 01:59

I\'m fairly new to codeigniter, But i\'m learning well, I\'m going to add a css, images, js, ... folder but I\'m not sure where to put it

Someone to

3条回答
  •  佛祖请我去吃肉
    2020-12-01 02:42

    I would revert back the changes you made to your index.php, as it looks to me like they're the source of the problem.

    I've been using a similar setup for CodeIgniter, whereby all my images, CSS, and JS go in a folder called static, and literally all I did was create that folder and put the files in it, and they worked fine. If you want to remove index.php from your URL's, you'll need to make sure that your .htaccess file doesn't rewrite the URL's for your static files.

提交回复
热议问题