• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
custom Class

Hello everybody.

well, as usual every day, you learn smth new Smile

Now I'm playing with my old class called - domain

so I saved the file under library directory,

renamed from
class domain {
class MY_domain {

then in the controller:

but here is a stop for me .. How do I work now?
Yearlier my procedure was :

$domain=new domain("codeigniter.com");
echo $domain->info()."<br>";

well, i'm stuck here and don't know how to move on now Smile

Any help appreciated guys !


You only must put the MY_ when extending core CI classes.
So just rename the class back to Domain, and it should work.

when i use: class domain {

function index()
        echo 'a';
While accessing the controller I get blank screen.

If I rename class domain to: class MY_domain
while accessing the controller I get 'a' as expected.

Any other thoughts?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.