relative link in code igniter |
[eluser]cjaffar[/eluser]
is there any way to have relative links to my <a>. at present, i am using base_url(), when i view source of my page, it gives me complete url with "http". is there any way i can base this relative - so i just get <a href='/books/writername/pagenumber'> and not to get <a href='http://me.world.com/books/writername/pagenumber'>
[eluser]mohsin917[/eluser]
Don't know much about CI. But this problem could be solved with explode function.. $ar = explode('com', $link); $af = $ar[1];
[eluser]seanloving[/eluser]
[quote author="cjaffar" date="1266942474"]is there any way to have relative links to my <a>. at present, i am using base_url(), when i view source of my page, it gives me complete url with "http". is there any way i can base this relative - so i just get <a href='/books/writername/pagenumber'> and not to get <a href='http://me.world.com/books/writername/pagenumber'>[/quote] read the user guide section about $this->uri->uri_string |
Welcome Guest, Not a member yet? Register Sign In |