anchor() generates wrong links? |
[eluser]XORd[/eluser]
Here is what happened. I have the following code: Code: $items = $this->db->get('items')->result(); $links holds the links, each link pointing to its respective item, having the item's title. However, the first link seems to come out broken. Try it for yourself and see if you get any other result. Of course, I was able to generate the correct link using base_url(). Just wondering if there's anything wrong with anchor()... Thanks.
[eluser]Edmundas KondraĊĦovas[/eluser]
[quote author="XORd" date="1233782310"] However, the first link seems to come out broken. [/quote] Hi and welcome to CI forums, XORd. Could you be more specific? What exactly do you mean by saying the link comes out broken?
[eluser]XORd[/eluser]
Oh, dang! I apologize! Anchor() works perfectly! It's me who replaced the period with a comma. I'm sorry... Thanks anyway... (I wish I could remove this thread)
[eluser]NateL[/eluser]
[quote author="XORd" date="1233798766"] (I wish I could remove this thread)[/quote] naw - someone else may have the same issue and find your thread, and you've solved more than your problem without doing a thing
[eluser]mandril[/eluser]
it would be better if you edit the title of the thread and add [SOLVED] before it =)
[eluser]mindesign[/eluser]
How did you end up solving this? I'm currently having an issue where I use anchor() but it doesn't include the index.php in the link thus I get bad links anchor($row['archive'],'(read more)'); results is http://localhost:8888/news/archive/81/Th...news-posts when it should be http://localhost:8888/index.php/news/arc...news-posts any help? thanks!! grant
[eluser]mindesign[/eluser]
oh and my config file looks like so Code: /*
[eluser]brianw1975[/eluser]
look in application/config/config.php /* |-------------------------------------------------------------------------- | Index File |-------------------------------------------------------------------------- | | Typically this will be your index.php file, unless you've renamed it to | something else. If you are using mod_rewrite to remove the page set this | variable so that it is blank. | */ $config['index_page'] = "";
[eluser]mindesign[/eluser]
[quote author="brianw1975" date="1235119589"]look in application/config/config.php /* |-------------------------------------------------------------------------- | Index File |-------------------------------------------------------------------------- | | Typically this will be your index.php file, unless you've renamed it to | something else. If you are using mod_rewrite to remove the page set this | variable so that it is blank. | */ $config['index_page'] = "";[/quote] Not too sure what you're saying here. I posted my config file in the post before.
[eluser]brianw1975[/eluser]
sorry, shoulda read the OP closer.. are you using mod_rewrite (.htaccess file)? also... out of curiosity... why did you change the base_url? you could have just added ':8888' $config['base_url'] = (isset($_SERVER['HTTPS']) ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].":8888/"; |
Welcome Guest, Not a member yet? Register Sign In |