View Single Post
Old Jul 29th, 2005, 2:57 PM   #1
Intimidat0r
Hobbyist Programmer
 
Intimidat0r's Avatar
 
Join Date: May 2005
Location: Don't know, but the padded walls are a nice touch.
Posts: 126
Rep Power: 0 Intimidat0r is an unknown quantity at this point
Send a message via ICQ to Intimidat0r Send a message via AIM to Intimidat0r Send a message via MSN to Intimidat0r Send a message via Yahoo to Intimidat0r
aargh! include thing with function call

i have a file called, let's say, stuff.php. i put this code in it:

<?PHP
function doSomething() {
 # do something productive here
}
?>

and then in some other file i have this: (well call it otherstuff.php)

<?PHP
include 'stuff.php'; #yes it's in the right dir, etc.
function doSomethingElse() {
 doSomething();
}
?>

but when i open the page it says this:

Quote:
Fatal error: Call to undefined function: doSomething() in /wherever_it_is/otherstuff.php
Does anybody know what may be causing this?
__________________
Children in the dark cause accidents, and accidents in the dark cause children.

http://www.ronincoders.org
Intimidat0r is offline   Reply With Quote