Welcome Guest, Not a member yet? Register   Sign In
Why the application folder is not within system folder in CI 2.0.2 ? Does that matters for the path of the programs in C
#11

[eluser]CodeIgniteMe[/eluser]
I notices something in your view:
Code:
<body>
<div id=“wrapper”>
  <div id=“header”>
  &lt;?php $this->load->view(‘header’);
  </div>
  
  <div id=“nav”>
  &lt;?php $this->load->view(‘navigation’);
  </div>
  
  <div id=“main”>
  &lt;?php $this->load->view(‘main’);
  </div>
  
  <div id=“footer”>
  &lt;?php $this->load->view(‘footer’);
  </div>
</div>
&lt;/body&gt;
&lt;/html&gt;
You don't have a closing PHP tag on every $this->load->view() method calls.
I don't think it causes the error issue, but you can first try to fix this.
#12

[eluser]fancy_stuff[/eluser]
Thanks to point it out, but the error is still there.
#13

[eluser]toopay[/eluser]
try naming your model as descriptive as possible, in this case is better to have a model named "Category_model" rather than MCats( follow CI General Style and Syntax for more details).
#14

[eluser]Spelljack[/eluser]
Loader class uses ucfirst() function when calling a model/library inside Loader::model() method. So try Mcats instead. Changing your model name will be enough (Mcats).

This is explained in User Guide. Check this: http://ellislab.com/codeigniter/user-gui...ml#anatomy

This is also explained on PHP Style User Guide: http://ellislab.com/codeigniter/user-gui...hod_naming
#15

[eluser]Jeeva[/eluser]
Hi,

I encountered the same error. After a long research , I found the silly mistake of mine,

Did you enclose the code of your model php file inside &lt;?php ... ?&gt; ?

I hope not... This fixes the issue. It's not only our mistake. Even the codeIgniter tutorial misguided us...

Hope this helps....

Thanks,
Jeeva
#16

[eluser]InsiteFX[/eluser]
You must be a spammer because this is not a CodeIgniter Tutorial!
#17

[eluser]Jeeva[/eluser]
Check out this link of CodeIgniter User Guide for Models....

http://ellislab.com/codeigniter/user-gui...odels.html

none of the examples have their code enclosed within the php syntax,

&lt;?php
......
?&gt;

Whereas, the examples given for Controllers has the traditional php syntax,

http://ellislab.com/codeigniter/user-gui...llers.html.

I'M NOT A SPAMMER.....!




Theme © iAndrew 2016 - Forum software by © MyBB