[Asterisk-Users] Is there a right place for a include_once statement in a PHP AGI script?

Christoph Eicke cei at inmedias.it
Fri Aug 5 05:18:23 MST 2005


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



More information about the asterisk-users mailing list