Jump to content

Can someone explain on how to include other files/classes in a PHP class?


2levelsabove

Recommended Posts

Yes I have googled it yet the results have been inconsistent.

 

I just want to use the right methodology in terms of OOP development.  If I wish to include another class for its functions and/or PHP file what is the proper way to do it? I have also heard of _autoload() and am confused at this point.

 

Would appreciate any help. Thanks

 


//what if I want to include code from phpmailer class??????
class test{

var $test= "";

function test($test) { //constructor
$this->url=$test;
} 

function domesomething() {

return $result;
}



}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.