CodeIgniter Forums
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 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: 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 (/showthread.php?tid=43121)

Pages: 1 2


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 - El Forum - 07-01-2011

[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.


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 - El Forum - 07-01-2011

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


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 - El Forum - 07-01-2011

[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).


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 - El Forum - 07-03-2011

[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-guide/general/models.html#anatomy

This is also explained on PHP Style User Guide: http://ellislab.com/codeigniter/user-guide/general/styleguide.html#class_and_method_naming


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 - El Forum - 02-21-2012

[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



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 - El Forum - 02-21-2012

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



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 - El Forum - 02-21-2012

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

http://ellislab.com/codeigniter/user-guide/general/models.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-guide/general/controllers.html.

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