Welcome Guest, Not a member yet? Register   Sign In
Having problems with anchor
#1

[eluser]esimuro[/eluser]
I am a newbee at both PHP and CI therefore take anything I say with more than a grain of salt.

For some reason the anchor tab is producing what I believe is incorrect output, The following anchor line
anchor('auth/forgotten_password', $this->lang->line('sentry_forgotten_password_label')

produces the following URL
http://localhost/index.php/index.php/aut...n_password

Note the double entry of index.php

echoing the site_url or the index_page both produce a single instance of index.php and I would have anticipated that anchor would have produced the same result. What am I doing wrong here ?

Thanks in advance for any help
#2

[eluser]marcmesa[/eluser]
check your application/config/config.php file.
Make sure you typed the correct $config['base_url'](not ending in index.php)
#3

[eluser]esimuro[/eluser]
Thanks for the fast reply, I had checked that before posting, in the config.php I have the following values:
$config[base_url] = "",
$config[index_page] = "index.php",
$config['uri_protocol'] = "AUTO",
$config['url_suffix'] = "",
$config['language'] = "english",
$config['enable_hooks'] = TRUE,
$config['subclass_prefix'] = 'MY_',

Basically the way it came out of the box, I can get it to9 work by setting $config[index_page] = "" but I am sure that this will cause some other grief down the road.

Any assistance will be greatly appreciated.
#4

[eluser]esimuro[/eluser]
Ignore the last post please, I found the problem it was because I didn't have the base_url set to anything. I don't understand why this was malfunctioning but after setting it to http://localhost/ things started working.


Thank you for your help
#5

[eluser]marcmesa[/eluser]
As a note to the $config['base_url']: in the wiki there's an interesting way to get automatic config base url even if you change from server.
It may be useful to you in the future.




Theme © iAndrew 2016 - Forum software by © MyBB