I have a class called myClass in /myDir/myClass.php. When user types url:
http://mysite.com/myDir/myClass.php, I want to automatically create an instance of myClass. What technique can I use to do this? the idea is to use myDir directory as top level of programs that user can call directly, but I don't want to add instance_of_myClass = new myClass(); because then I won't be able to extend the class. Does this make sense?
class myClass { __construct() { echo "hello World"; $this->myClass_report(); } myClass_report() { // some code here } }