![]() |
Cannot display images in CodeIgniter - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Cannot display images in CodeIgniter (/showthread.php?tid=88055) |
RE: Cannot display images in CodeIgniter - kenjis - 07-13-2023 (07-13-2023, 03:35 AM)ilkin Wrote: Folder structure is the following: I have project-root folder, which is the baseUrl. It seems you are confusing baseUrl and folders in filesystem. The project-root folder is not baseUrl. baseUrl is a URL, not a folder or directory. RE: Cannot display images in CodeIgniter - ilkin - 07-13-2023 I know the difference between baseUrl and filesystem. What I meant was - I manually set baseUrl to project-root RE: Cannot display images in CodeIgniter - JustJohnQ - 07-13-2023 Just out of curiosity: can you add css files to your view files using base_url() ? RE: Cannot display images in CodeIgniter - ilkin - 07-13-2023 No. It does not work either. This is just crazy) External links work just fine though. The problem is in internal routing. I just do not know what exactly the problem is. RE: Cannot display images in CodeIgniter - JustJohnQ - 07-13-2023 base_url() is your problem... is project-root a folder in which app and public are located? RE: Cannot display images in CodeIgniter - ilkin - 07-13-2023 Yes, that's right RE: Cannot display images in CodeIgniter - InsiteFX - 07-13-2023 Show your app\Config base_url setting. RE: Cannot display images in CodeIgniter - ilkin - 07-14-2023 public string $baseURL = 'http://localhost:8080/project-root'; RE: Cannot display images in CodeIgniter - JustJohnQ - 07-14-2023 add a trailing slash: public string $baseURL = 'http://localhost:8080/project-root/'; RE: Cannot display images in CodeIgniter - ilkin - 07-14-2023 Did not help either( |