note 11342 added to require
| From: | flash at nospam dot drewnels dot net | Date: | Fri, 16 Feb 2001 19:43:57 +0000 |
| Subject: | note 11342 added to require | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-11151@lists.php.net to get a copy of this message | ||
in the documentation the following is noted:
require() is not actually a function in PHP; rather, it is a language construct. It is subject to
some different rules than functions are. For instance, require() is not subject to any containing
control structures.
I have found this statement to NOT be true. I get an error for the following:
class myclass()
{
require("myfile.php")
};
I want to be able to include a function from another file that will become a method for the class.
Any suggestions?
http://www.php.net/manual/en/function.require.php