url problems , system/application/controllers/myindex.php |
[eluser]Peter74[/eluser]
Hi all, i cant resolve this issue, i have 3 files --controllers -----front.php -----inicio.php --views -----front_view.php config.php Code: $config['base_url']= "http://www.ejemplo1.local/"; routes.php Code: $route['default_controller'] = "front"; first its generate front.php call his view front_view.php, and print the page corrently in that page are links like this Code: <?= anchor('inicio.php?lang=es', 'Idioma en Espanol');?> but the browser give me this result The requested URL /inicio.php was not found on this server. if i write Code: <?= anchor('system/application/controllers/inicio.php?lang=es', 'Idioma en Espanol');?> work what iam doing wrong? any comments helpme, txs
[eluser]tonanbarbarian[/eluser]
you do not create an anchor to inicio.php?lang=es you need to create the link in the following format /controller/method/.../.../... so for your example it would be /inicio/index/lang/es Code: <?= anchor('/inicio/index/lang/es', 'Idioma en Espanol');?> Code Igniter does not use querystrings I think you should read the User Guide again
[eluser]Peter74[/eluser]
ok, that was wrong, but.. forget the ?lang=es , iam just wanna go to the inicio.php , in the controllers folder any way i need recive the "lang" parameters for include the selected lang.php whit the content apropiate txs for advance , any comments helpme a lot
[eluser]Skuja[/eluser]
If i understood you right you want something like this: in front_view.php Code: <?=anchor('inicio/index/es','es')?> Code: function index($language) |
Welcome Guest, Not a member yet? Register Sign In |