CodeIgniter Forums

Full Version: $baseURL ci 4 and ci3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
on ci3, $baseURL i setup as http://localhost/ci3/ , it worked correctly with end slash
but on ci4, $baseURL = 'http://localhost/ci4/' on .env and Config/App.php it come out with out end slash -> http://localhost/ci4
am i missing something or is this normal?  Huh
(04-21-2021, 11:21 AM)underware Wrote: [ -> ]on ci3, $baseURL i setup as http://localhost/ci3/ , it worked correctly with end slash
but on ci4, $baseURL = 'http://localhost/ci4/' on .env and Config/App.php it come out with out end slash -> http://localhost/ci4
am i missing something or is this normal?  Huh
Where "it come out with out end slash" ?
(04-22-2021, 10:45 PM)kenjis Wrote: [ -> ]
(04-21-2021, 11:21 AM)underware Wrote: [ -> ]on ci3, $baseURL i setup as http://localhost/ci3/ , it worked correctly with end slash
but on ci4, $baseURL = 'http://localhost/ci4/' on .env and Config/App.php it come out with out end slash -> http://localhost/ci4
am i missing something or is this normal?  Huh
Where "it come out with out end slash" ?

on CI3
$config['base_url'] = 'http://localhost/ci3/'; if you do <?php echo base_url(); ?>, output is [font=Tahoma, Verdana, Arial, sans-serif]http://localhost/ci3/[/font]
[font=Tahoma, Verdana, Arial, sans-serif][font=Tahoma, Verdana, Arial, sans-serif]$config['base_url'] = 'http://localhost/ci3'; if you do [font=Tahoma, Verdana, Arial, sans-serif]<?php echo base_url(); ?>, output is [/font][font=Tahoma, Verdana, Arial, sans-serif][font=Tahoma, Verdana, Arial, sans-serif]http://localhost/ci3[/font][/font][/font][/font]
CI4
app.baseURL = 'http://localhost/ion/', or app.baseURL = 'http://localhost/ion if you do <?php echo base_url(); ?>, output is always http://localhost/ion
no end slash
I don't know why but it seems it is a specification of CI4's base_url().