Leo Burd
2005-Aug-05 05:04 UTC
[Asterisk-Users] Is there a right place for a include_once statement in a PHP AGI script?
Hello there, I'm new to PHP AGIs and I'm having problems with a particular script that has a "include_once" statement on it. If I remove that stament, the script runs until the section of the code that depends on the include and then returns. If I include that statement, the script does not seem to run at all. What shall I do? Thanks in advance, Leo
Christoph Eicke
2005-Aug-05 05:18 UTC
[Asterisk-Users] Is there a right place for a include_once statement in a PHP AGI script?
On Friday 05 August 2005 14:04, Leo Burd wrote:> Hello there, > > I'm new to PHP AGIs and I'm having problems with a particular script > that has a "include_once" statement on it. If I remove that stament, > the script runs until the section of the code that depends on the > include and then returns. If I include that statement, the script does > not seem to run at all. What shall I do?Leo, wrap a function around whatever is in the included script, make your include_once() statement at the top of the AGI and then simply call the function at the place where it's necessary for that code to be executed. Christoph