Re: #include + global functions

From: Date: Sun, 04 Jun 2000 15:30:20 +0000
Subject: Re: #include + global functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-978@lists.php.net to get a copy of this message
Hi Daniel! On Sun, 04 Jun 2000, Daniel Schmolze wrote: > I'm having trouble getting #include to work like I want it to. I want > to have a file that contains a bunch of functions and variables. When > I #include this file, I want the functions and variables contained > within to be accesible in my script. Here's what the external file > looks like: > > ##include.php## > <? > function test() > echo "This is a test function.\n"; > } > ?> > > And here's what my script looks like (let's say): > > ##script.php## > <? - #include "include.php"; + include "include.php"; > > test(); > ?> -- teodor

« previous php.general (#978) next »