See following code with some inclusion:
class Myclass {
var $a;
function myfunc () {
include (include1.php);
}
}
include (include2.php);
} //end class definition
include (include3.php);
In include1.php is the following code:
<?php
function myfunc1 () {
...
}
?>
Similarly in include2.php is defined the myfunc2() function, and in include3.php is the myfunc3().
So, the inclusion #1 and #3 are working. The inclusion #2 does not: syntax error.
I wish to use the inclusion #2 to include many functions that are methods of the class Myclass and that are in a separate file to make the class definition easier to read.
What's wrong? something I did or really it's not possible include php code into a class definition ?