cant get to work site_url in anchor |
[eluser]Edgars[/eluser]
Code: class Welcome extends Controller { Code: <body> All is taken from codeigniter user_guide. And The requested URL /index.php/welcome/content was not found on this server. this is what I get when I click on link. Why it ain't working?
[eluser]Bart v B[/eluser]
You have already a 'Welcome' controller. So you just have to remove your other welcome segement. Code: <?php
[eluser]Bart v B[/eluser]
Is your pc jumping...? ![]() Errors please.. its very difficult to help without to see what your doing.
[eluser]Edgars[/eluser]
Not Found The requested URL /index.php/welcome/content was not found on this server. Apache Server at example.com Port 80 Same error as before. Reinstalled wamp server and codeigniter. When I try using that link I made, he throws me to http://example.com/index.php/welcome/content and shows error instead 'asdf' But when I enter manually in adress bar http://localhost/index.php/welcome/content, I got echo'ed 'asdf' as it is supposed to. Ah when I posted reply, I saw my problem. Had to change $config['base_url'] = "http://example.com/"; to $config['base_url'] = "http://localhost/"; in config file ![]() <?php class Welcome extends Controller { function __construct() { parent::Controller(); $this->load->helper('url'); } function index() { $this->load->view('welcome_message'); } function content(){ echo "asdf"; } } ?> Code: <body> |
Welcome Guest, Not a member yet? Register Sign In |