Domanda

I am working on a project that is using HMVC stucture for my codeigniter project and using an assets and template library to handle different assets and templates and themes. Its the libraries from PyroCMS. As of right now I'm hardcoding my values in as since.

I do have a little bit of a difference between my file structure and that of PyroCMS as they have a folder inside their system folder for that houses all of their application files.

Asset::add_path('theme', APPPATH . 'themes/mythem/assets/');
Asset::set_path('theme');

When I echo out the asset for my page for the current theme I'm using it shows up as

http://dev.mysite.com/application/themes/mytheme/assets/css/bootstrap/bootstrap.css 



application/
    themes/
        mytheme/
            assets/
                css/
                    whatever.css
assets/
    cache/
system/
public_html/
    index.php
È stato utile?

Soluzione

You can't access the application folder directly.

EDIT

You CAN access the application folder directly, but you really shouldn't. It's not safe because it allows direct access to your logic files (controllers, models, etc.). Refer to this question: CodeIgniter + CSS

Stick your assets folder outside of application and add it to your .htaccess file:

RewriteCond $1 !^(assets|other_toplevel_folders)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top