Lack of access to files in application/third_party/ - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Lack of access to files in application/third_party/ (/showthread.php?tid=65931) |
Lack of access to files in application/third_party/ - marcom - 08-11-2016 Hi, I am new to CI. In my application I am trying to use a template consists of various files (css, images, js etc.) I placed in application/third_party (to facilitate future updates). When I open the first window, the result is incorrect because - I think - do not read CSS found in application/third_party/template/bootstrap/css To connect the css, in the view I put: PHP Code: <link rel="stylesheet" href="<?php echo base_url() . 'application/third_party/template/bootstrap/css/bootstrap.min.css' ?>"> and in application/config/config.php: PHP Code: $config['base_url'] = 'http://localhost/my_application/'; Trying to view the css with Web Developer, the result is a "403 Error" (but the webserver is local and do not know whether this result is reliable). I specify tha there is no .htaccess and I am working in local (Xampp 5.6.23 on Ubuntu 16.04 / Php 5.6.23 / CodeIgniter 3.1.0). What can be the cause? Suggestions? Thank you. RE: Lack of access to files in application/third_party/ - Wouter60 - 08-11-2016 Your php statement is missing the semi-colon at the end. Try this: PHP Code: <link rel="stylesheet" href="<?php echo base_url() . 'application/third_party/template/bootstrap/css/bootstrap.min.css';?>" /> If that doesn't work either, check your browser's debug window (e.g. in Internet Explorer: F12). There you can see the full link to your css file that has been generated by your page. Btw, the most common place for css and javascript files is a folder named "assets", directly below your website's root folder. RE: Lack of access to files in application/third_party/ - marcom - 08-19-2016 The full links to css (generated) are correct. Trying to view the css with Chrome + Web Developer, the result is a "403 Error". I moved the template from "application/third_party/template" to "assets/template" and now it works. That's okay. But why it does not work in "application/third_party/"? Is there anything that prevents the css reading from here? Thanks so much. |