Welcome Guest, Not a member yet? Register   Sign In
Help about load Library
#1

[eluser]Đỗ Thanh Tùng[/eluser]
My site work perfectly on localhost but i got problem when i running it on host.
I have 3 file in library directory but non of them loaded.
I dont know how to fix it
#2

[eluser]Derek Allard[/eluser]
I'm moving this into a more appropriate forum to help you get the help you need.

That said, can you give us any further information? Are you getting an error message?
#3

[eluser]Đỗ Thanh Tùng[/eluser]
Custom library can't be load in server.
This is my Navigation library :
Code:
<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
class Navigation {
    
    var $ci;
    
    function __construct()
    {
        $this->ci =& get_instance();
        $this->ci->load->library('session');
        $this->loadCategories();
    }
    
    function loadCategories()
    {
    $template['menu'] = '<ul>';
    $query = $this->ci->db->get('loaitour');
    foreach ($query->result() as $row)
    {
        if ($row->trangthai) {//Chỉ hiển thị những Loại TOur cho phép
               $template['menu'] .= '<li><a href="'.base_url().'index.php/tour/view/' . $row->id_loaitour . '">' . $row->ten_loaitour . '</a></li>';
           }
    }
    $template['menu'] .= '</ul>';
    $this->ci->load->view('menu', $template, true);
    }

}
My View is &lt;?=$view?&gt; and problem is unknow view.
if I change function __construct() into function Navigation() it got another problem. I'm beginner in PHP
#4

[eluser]Đỗ Thanh Tùng[/eluser]
Sorry. My library cant work with __construct. It only work with Navigation()
#5

[eluser]Đỗ Thanh Tùng[/eluser]
I fixed it. Thanks for help.




Theme © iAndrew 2016 - Forum software by © MyBB