Welcome Guest, Not a member yet? Register   Sign In
how i call the controllers?
#1

[eluser]Peter74[/eluser]
sorry about my newbies questions, i hope u can helpme, iam sure this is a stupid queston, but i have to ask, i spend 1 day to resolv... and not good result iam getting crazy
here is, i have this

--- controllers
----- front.php
----- inicio.php

--- views
----- front_view.php

front.php
Code:
<?php
    class Front extends Controller{
        function Front(){
            parent::Controller();
            $this->load->helper('url');
        }
        function index(){
            $url['es']=anchor('front/someone','Show me someone function');
            $url['en']=anchor(base_url().'inicio','Please load the inicio controller!');
            $this->load->view('front_view', $url);
        }
        function someone(){
            echo "iam someone";
        }
    }
?>

inicio.php

Code:
<?php
    class Inicio extends Controller{
        function Inicio(){
            parent::Controller();
        }
        function index(){
                echo "iam the inicio controller!!!";    
        }
    }
?>


front_view.php
Code:
<html>
<body>
&lt;?=$es;?&gt;<br>
&lt;?=$en;?&gt;<br>
&lt;/body&gt;
&lt;/html&gt;

when i click, the browser give me the same results for boths links
"server not found"

txs for comments, any think helpme a lot
#2

[eluser]Peter74[/eluser]
well, was stupid question, but i dont know why
changing in config.php
this
Code:
$config['base_url']="http://proyectos.chi/";
for this
Code:
$config['base_url']= "http://www.proyectos.chi/";

its work!!




Theme © iAndrew 2016 - Forum software by © MyBB