Jump to content

include class files


kundan

Recommended Posts

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

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.