• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moved Assets Folder Error


I have moved my assets folder into application folder but now will not pick up my js or css file?
in my assets folder are sub-folders called

I have added url helper in auto load and my header controller

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Header extends CI_Controller {

function index() {





<!-- header View -->

<meta charset="utf-8">
    <meta name="viewport" c initial-scale=1.0">
    <meta name="description" c>
    <meta name="keywords" c>
    <meta name="author" c>
    <link rel="shortcut icon" href="application/assets/ico/favicon.png">


    <!-- Bootstrap core CSS -->
    <link href="<?=base_url()?>assets/css/bootstrap.css" rel="stylesheet">

    <!-- Bootstrap theme CSS -->
    <link href="<?php echo base_url();?>application/assets/css/bootstrap-theme.css" rel="stylesheet">

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>


Assets shouldn't go in the application folder, standard structure for CI is as follows:


Good explanation here http://stackoverflow.com/questions/14403...odeigniter if you want to continue with having assets in your application folder


I have made is like this


Is that OK or would you still recommend having in system.

You can't directly access anything that is in /system or /application via the url, on purpose. They are protected with an htaccess file. It's a security concern - otherwise people could directly load your controllers/models/libraries/views, etc.

Like you can't just go to www.yoursite.com/application/controllers/some_real_controller.

So the way you have it now is they way it should be - or in any other publicly accessible directory.

[quote author="Carrara_WS" date="1382097661"]I have made is like this


Is that OK or would you still recommend having in system.[/quote]

Sorry that was an incorrect indentation from me, I have corrected Smile how you made it now is the standard structure

OT: what are assets for? sorry just learning

[quote author="jairoh_" date="1382153752"]OT: what are assets for? sorry just learning[/quote] assets is where I keep. my css and javascript and images its custom folder. Also new hmvc-codeigniter install wizard currently been made with my programmers. So you do not have to edit database config file you would go and through install stage and would dump you database details on there and would auto connect.

Also two other stages which are in the process.

Our website is currently been up graded http://www.carrarawebsitesolutions.com we use codeigniter and hmvc and bootstrap 3 template engines will be coming soon plus ci modules and hmvc modules.

you can view live updates of our progress at any time. It is on upgrade mode so some links may not work.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.