![]() |
JS and CSS URL change - 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: JS and CSS URL change (/showthread.php?tid=79950) |
JS and CSS URL change - eddoh - 08-21-2021 Hello, I have a problem with a methohe from a controller. Indeed, when I call it the js and css loading path changes and they fail to load. correct path : http://localhost:8081/assets/images/logo.svg wrong path after method call : http://localhost:8081/update_user/assets/images/logo.svg Below my code PHP Code: $routes->get('/users', 'Admin/Users::index'); PHP Code: public function update_user($id) RE: JS and CSS URL change - nfaiz - 08-22-2021 (08-21-2021, 03:37 AM)eddoh Wrote: Hello, Try PHP Code: <?= base_url('assets/images/logo.svg') ?> |