Re: note 11342 added to require

From: Date: Fri, 16 Feb 2001 23:15:30 +0000
Subject: Re: note 11342 added to require
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-11170@lists.php.net to get a copy of this message
That is expected, use include which operates at runtime, check php.faqts.com and links at www.php.net/support.php for more info. Your note will be removed --- flash@nospam.drewnels.net wrote: > 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 > > > -- > PHP Notes Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-notes-unsubscribe@lists.php.net > For additional commands, e-mail: > php-notes-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > ===== --- Jesus M. Castagnetto <jmcastagnetto@php.net> __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/

« previous php.notes (#11170) next »