Url helper - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: Url helper (/showthread.php?tid=69424) |
Url helper - blackiven - 11-20-2017 Hi, I use Codeigniter Version 3.1.6 Here is my bootstrap navbar: Code: <nav class="navbar navbar-expand-lg navbar-light bg-light"> Don't know but the links under Home and About are not working correctly. Please help me. Thanks. Regards RE: Url helper - PaulD - 11-20-2017 You should use site_url here. PHP Code: <a href="<?php echo site_url(); ?>">Home</a> https://www.codeigniter.com/user_guide/helpers/url_helper.html#site_url RE: Url helper - blackiven - 11-20-2017 This is the output with "echo" http://localhost/blog/localhost/blog and without "echo" http://localhost/blog If I click on About it shows me a wrong URL under Home RE: Url helper - blackiven - 11-20-2017 It is all ok, I typed the wrong URL in config file. |