setting the base_url() |
08-31-2021, 06:03 AM
(This post was last modified: 08-31-2021, 06:07 AM by captain-sensible. Edit Reason: added text )
For codeIgniter4
On Desktop using spark serve i set mine (app/config/App.php ) to: public $baseURL = 'http://localhost:8080/'; ON Apache i set up to use 127.0.0.5 public $baseURL = 'http://127.0.0.5/'; for images ,depends where they are if relative to public directory then; <img class ="img-fluid" src = "<?php echo base_url('images/logo.png'); ?>" > // images is a directory inside public so depends where assets dir is ; there are . See the difference in use between my code and yours. Also note "/" at end of public $baseURL = 'http://localhost:8080/'; |
Messages In This Thread |
setting the base_url() - by richb201 - 08-30-2021, 10:33 PM
RE: setting the base_url() - by captain-sensible - 08-31-2021, 06:03 AM
RE: setting the base_url() - by richb201 - 08-31-2021, 01:21 PM
|