#include + global functions
| From: | Daniel Schmolze | Date: | Sun, 04 Jun 2000 15:24:24 +0000 |
| Subject: | #include + global functions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-977@lists.php.net to get a copy of this message | ||
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";
test();
?>
How can I make this work?