|
Posted by ZeldorBlat on 11/29/07 19:50
On Nov 29, 2:44 pm, James Mackin <s0452...@sms.ed.ac.uk> wrote:
> JP wrote:
> > The problem I'm having is that instead of including the file and thus
> > defining the functions within my main script, the included files are
> > being displayed as text.
>
> My guess is that the included file doesn't have execute permissions
> meaning the code is inserted rather than executed.
Probably not. The PHP files are not "executed" so to speak. The PHP
engine is the actual executable and merely reads the files.
The example the OP posted should work correctly. He said "I get an
error because basically, I'm nesting <?php ?> tags." What error are
you getting? Having the PHP tags in the include file is the correct
way to do it -- otherwise PHP doesn't know it needs to parse the file.
Navigation:
[Reply to this message]
|