Path to Assets - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: Path to Assets (/showthread.php?tid=62255) |
Path to Assets - soonerdm - 06-24-2015 I'm not sure what we are doing wrong but I cannot pull any images, css or js from the directories I have created in the MVC directory /main /mvc /mvc/images /mvc/js /system If I link them directly <img src="http://ip_address/~sandbox/images/home.png"> Nothing $this->load->helper('url'); echo "<img src=".base_url('images/home.png').">"; doesn't work either but it does echo the html <img src="http://ip_address/~sandbox/images/home.png"> It appears the helper('url') method is working correctly but still cant see the image its pulling. Is there something we missed in configuration? Something thats not in .htaccess we need? Fresh install of CI 3 on SUSE12 with Oracle 11g. RE: Path to Assets - skunkbad - 06-24-2015 (06-24-2015, 01:19 PM)soonerdm Wrote: I'm not sure what we are doing wrong but I cannot pull any images, css or js from the directories I have created in the MVC directory You might want to look in the access logs. Is it just a 404 error, or something else? What does your current /.htaccess look like? RE: Path to Assets - InsiteFX - 06-24-2015 Also make sure your asset folder is in the root with index.php the CodeIgniter folders are protected. You can also create your asset_helper.php PHP Code: /** You can use the above code to create any type of asset you need. img, css etc; RE: Path to Assets - soonerdm - 06-25-2015 (06-24-2015, 04:28 PM)skunkbad Wrote:(06-24-2015, 01:19 PM)soonerdm Wrote: I'm not sure what we are doing wrong but I cannot pull any images, css or js from the directories I have created in the MVC directory RE: Path to Assets - CroNiX - 06-25-2015 Root dir of your website aka document_root |