RE: [PHP-DEV] 'include' function
| From: | Esteban F. | Date: | Fri, 06 Dec 2002 14:41:48 +0000 |
| Subject: | RE: [PHP-DEV] 'include' function | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-92163@lists.php.net to get a copy of this message | ||
function ala() {
include file.php;
}
Krzysztof Socki <ksocki@onyx.pl> escribió en el mensaje de noticias
20021206132939.55518.qmail@pb1.pair.com...
>
> U¿ytkownik Hartmut Holzgraefe <hartmut@six.de> w wiadomooci do grup
> dyskusyjnych napisa³:3DF0A506.805@six.de...
> > Krzysztof Socki wrote:
> > > Hello!
> > > Can anyone tell me if it's possible to extent PHP with a function that
> > > includes other PHP file? I know that 'include' is not a function, is
it
> > > possible to work it around? I need a function that includes a file
> > > respective to the location of the running script. Maybe I could extend
> the
> > > parser to use an alias of 'include' with a constant file path? I'd be
> > > grateful for your help. Thanks in advance.
> >
> > function include_me($path) {
> > include $path;
> > }
> >
> > should do the trick?
> >
> I need a function that includes a file, but doesn't show that something is
> included. I would like to be able to do something like this:
>
> ala(); // include some file - the name of the included file
is
> constant respective to the script location
> ela(); ola(); // use functions defined at the included file
>
> Can you help?
>
> KS.
>
>