Using external class in my Controller |
Im working on my first project in CodeIgniter and I wonder How can I use my class from library in my Controller.
libraries/Twitterclass.php: PHP Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); My Controller: PHP Code: public function microtweets() I want to use his extended class in my controller and work there on this $n value or for example display it in my View. I got few errors in my view for example: Quote:A PHP Error was encountered
libraries/Twitterclass.php defines a class Twetterclass? The names need to match.
(12-08-2015, 03:58 AM)lipa Wrote: Im working on my first project in CodeIgniter and I wonder How can I use my class from library in my Controller. The Tweeterclass::__construct should be PHP Code: public function __construct($params) { Read more here |
Welcome Guest, Not a member yet? Register Sign In |