Problems with finding variables from function
Posted: Sun Nov 12, 2006 5:21 pm
feyd | Please use
hope that gives the general idea, the error i am getting is that in the watching_messages() function the vars arn;t loaded, i have tried suing include and require instead of require_once, but no better. i cannot have a include or anything in the function as there is a function declared in vars.php that cannot be declared twice. its probablt due to my coding but any suggestions??
ps its only happened since there was a server update and security increased for php files running.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi, i am having problem with trying to get variables into a function that is declared after a require_once...its hard to explain so this is what i have:Code: Select all
require_once('scripts/vars.php');
watching_messages(some variables){
find people to send messages too;
$email = "bla bla {$from vars.php file};
}
if(user submits add message form)
add the message to database;
watching_messages(); //check to see if anyone watching this message
}
echo "page using variables from vars.php"hope that gives the general idea, the error i am getting is that in the watching_messages() function the vars arn;t loaded, i have tried suing include and require instead of require_once, but no better. i cannot have a include or anything in the function as there is a function declared in vars.php that cannot be declared twice. its probablt due to my coding but any suggestions??
ps its only happened since there was a server update and security increased for php files running.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]