![]() |
CodeIgniter 4 base_url() bug - 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: CodeIgniter 4 base_url() bug (/showthread.php?tid=79119) |
CodeIgniter 4 base_url() bug - Muzikant - 04-22-2021 If I will add a file parameter to base_url() function, it will add an equal sign (=) to the end, which should not be there. I am considering this as a bug. I tested it in PHP 7.4 and 8. The code PHP Code: echo base_url('favicon.ico' . '?' . 'v101'); will output Code: http://localhost/favicon.ico?v101= I am using these parameters to force browsers to get the new versions of a files. RE: CodeIgniter 4 base_url() bug - iRedds - 04-22-2021 1. base_url() . 'favicon.ico' . '?' . 'v101'; 2. do not use base_url() 3. base_url('favicon.ico' . '?' . 'v=101') 4. configure caching on the server. RE: CodeIgniter 4 base_url() bug - Muzikant - 04-23-2021 (04-22-2021, 02:26 PM)iRedds Wrote: 1. base_url() . 'favicon.ico' . '?' . 'v101';
(04-22-2021, 02:26 PM)iRedds Wrote: 3. base_url('favicon.ico' . '?' . 'v=101') Oh, I get it. My mistake. I understand why it is adding an equal sign at the end now. In my case it is considered as the parameter name and expecting a value. |