Welcome Guest, Not a member yet? Register   Sign In
Get_instance Does not work in Hosting
#1
Exclamation 
(This post was last modified: 11-01-2017, 09:14 PM by buzz4rd.)

Hi, I'm using CI 3.1.0. I have made a Library. I used get_instance method in Library. It's Working fine in my local pc (xampp) But I'm getting blank page in My Hosting server. I can't figure it out.   Confused  Can anyone Help me, please?

Code:
   function __construct()
   {

       $this->CI =& get_instance();

       $this->CI->load->model('Soft_model');
}
Reply
#2

Why do you think the problem is related to the code you show?
Reply
#3

(11-01-2017, 09:36 PM)dave friend Wrote: Why do you think the problem is related to the code you show?

I'm not sure. Actually, I want to make Myself clear regarding the problem.
Reply
#4

Why do you think that the page not showing is related to loading the model?
Reply
#5

(11-01-2017, 08:51 PM)buzz4rd Wrote: Hi, I'm using CI 3.1.0. I have made a Library. I used get_instance method in Library. It's Working fine in my local pc (xampp) But I'm getting blank page in My Hosting server. I can't figure it out.   Confused  Can anyone Help me, please?

Code:
   function __construct()
   {

       $this->CI =& get_instance();

       $this->CI->load->model('Soft_model');
}

Check the error_log.
Reply
#6

(11-01-2017, 11:59 PM)dave friend Wrote: Why do you think that the page not showing is related to loading the model?
Because Without the Model it Works Fine. And the model class is fine.
Reply
#7

1) Make sure that your editor is not saving your code with the BOM.
2) Make sure there is no white space, newlines at the top and bottom of the file
3) Make sure you do not include the PHP closing tag ( ?> ).
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB