CodeIgniter 4 base_url() bug |
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.
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. (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. |
Welcome Guest, Not a member yet? Register Sign In |