06-08-2008, 09:26 AM
|
#6 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
You cannot include (or do very much else at all) directly within the body of the class definition, but you can inside methods.
PHP Code:
class Fail { // Generates parse error include 'myfile.php';
public function no_fail() { // Perfectly fine to include within a method include 'nofail.php'; } }
|
|
|
|