error using load vars |
[eluser]Asinox[/eluser]
hi guys, i have a error just in the homepage, (index), CI cant find the index view, i'm using a master template, and loading the content view with load vars. this happen when the url is "http://www.domain.com" and all is fine if the url is " http://www.domain.com/site" My index function controller Site: Code: function index(){ My master_page calling the home view Code: <div id="contenido"> any idea? thanks
[eluser]jbreitweiser[/eluser]
Check through the souce code in your browser on the local host. Maybe there is an error or warning that the remote host is not allowing to display. Some servers are set to hide any errors from end users.
[eluser]jbreitweiser[/eluser]
You can access the $this var in a view. Its not preferable because of the seperation of view and logic, but to include other views in a view I think its perfectly fine. I include my header and footer sections this way normally.
[eluser]Asinox[/eluser]
I dont know why the error, why the variable "main" is undefined, just in remote Code: A PHP Error was encountered
[eluser]jbreitweiser[/eluser]
Try loading the view like this: Code: function index(){
[eluser]Asinox[/eluser]
ejej thanks jbreitweiser por reply, but im trying all way ejej and nothing... i have another website in the same server, and in all website im using this way with load->vars(), i dont know where is my problem: Working: http://www.site.com/index.php/site not-working: http://www.site.com/index.php or http://www.site.com CONTROLLER Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Code: RewriteEngine on
|
Welcome Guest, Not a member yet? Register Sign In |