kundan Posted January 5, 2009 Share Posted January 5, 2009 hello sir, how to create class files and how can we include those class files in php?Kindly help me out on this regard Thanks in advance kundan Link to comment https://forums.phpfreaks.com/topic/139522-include-class-files/ Share on other sites More sharing options...
glenelkins Posted January 5, 2009 Share Posted January 5, 2009 The basics are: example.class.php <?php class Example { // Constructor - not essential! function Example() { } } ?> example.php <?php include_once ( 'example.class.php' ); $example = new Example(); ?> Link to comment https://forums.phpfreaks.com/topic/139522-include-class-files/#findComment-729846 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.