Confusions about path in CI - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Confusions about path in CI (/showthread.php?tid=23194) |
Confusions about path in CI - El Forum - 10-03-2009 [eluser]shinokada[/eluser] I am confused about how I can add paths to css, js etc. I am using XAMPP on Vista. At the moment what I do is http://127.0.0.1/my_ci/css/style.css etc. Q1. What is a better way to do this css and js? Q2. However I don't know how to add require_once('mynewphp.php') in controller. Will it automatically find mynewphp.php, even I add this in application/myclasses/ ? Q3. I get an error message with the following code. My ZEND files are in c:\xampp\htdocs\ci_day4\system\application\my_classes. Could anyone give me some tips about how to add path in CI please? Code: ini_set('include_path',ini_get('include_path').';'.BASEPATH.'application/my_classes/'); error message Code: Fatal error: require_once() [function.require]: Failed opening required 'Zend/Service/Flickr.php' (include_path='.;C:\xampp\php\pear\;C:\xampp\htdocs\ci_day4/system/application/my_classes/') in C:\xampp\htdocs\ci_day4\application\controllers\flickr.php on line 12 Confusions about path in CI - El Forum - 10-04-2009 [eluser]jedd[/eluser] In my view: Code: echo "\n". link_tag('assets/stylesheets/COMMON.css'); Confusions about path in CI - El Forum - 10-04-2009 [eluser]John_Betong[/eluser] Try this code just before you use require_once(...) then use a relative path to your included file: Code: echo '<br />' . base_url(); |