Re: [PHP] Function Declared in Included File Not Being Found

2007-05-13 Thread Chris
Richard, Neither removing the if/else nor the function_exists() not call worked. If I declared the function in the same file I called it works even when defining it after the call. If the function is declaring in a different file than the one I call it in and I include the files after the

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-13 Thread Stut
Chris wrote: Richard, Neither removing the if/else nor the function_exists() not call worked. If I declared the function in the same file I called it works even when defining it after the call. If the function is declaring in a different file than the one I call it in and I include the

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-12 Thread Richard Lynch
On Fri, May 11, 2007 3:43 pm, Chris wrote: Hello, According to the PHP manual on functions (http://www.php.net/manual/ en/language.functions.php): In PHP 3, functions must be defined before they are referenced. No such requirement exists since PHP 4. Except when a function is conditionally

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-12 Thread Richard Lynch
On Fri, May 11, 2007 6:15 pm, jekillen wrote: One reason I believe is that including a file in an included file will not work. file a includes file b wnich includes file c, code in file c will not register. (if I remember the manual correctly) I dunno what you were reading, but almost for

[PHP] Function Declared in Included File Not Being Found

2007-05-11 Thread Chris
Hello, According to the PHP manual on functions (http://www.php.net/manual/ en/language.functions.php): In PHP 3, functions must be defined before they are referenced. No such requirement exists since PHP 4. Except when a function is conditionally defined... If that is true then why

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-11 Thread jekillen
On May 11, 2007, at 1:43 PM, Chris wrote: Hello, According to the PHP manual on functions (http://www.php.net/manual/en/language.functions.php): In PHP 3, functions must be defined before they are referenced. No such requirement exists since PHP 4. Except when a function is conditionally

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-11 Thread Robert Cummings
Files are included/required at run-time. As such, the function has not been declared when you make reference to it since the require occurs later. Move the require to the top. As a test, feel free to explicitly define the function at the bottom without using a require. Cheers, Rob. On Fri,

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-11 Thread Chris
There was a specific reason that the require to the file defining the function came after the call to the function. But alas, it doesn't matter what the reason is now. Thanks for the explanation. Chris On May 11, 2007, at 7:53 PM, Robert Cummings wrote: Files are included/required at