note 13765 added to function.require.php
| From: | developer at libero dot it | Date: | Mon, 02 Jul 2001 13:10:53 +0000 |
| Subject: | note 13765 added to function.require.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-14901@lists.php.net to get a copy of this message | ||
Require nor Include function inner a class file.
This is the file where I define the class:
----- 1.php -----
<?
class test {
include("2.php");
}
?>
------ end ------
And this is the file where I have content.
----- 2.php -----
<?
var $a=1;
function method1 () {
$this->a++;
}
?>
------ end ------
This does not work.
http://www.php.net/manual/en/function.require.php