You are here: Re: newbie question about include() and include_once() functions « PHP Programming Language « IT news, forums, messages
Re: newbie question about include() and include_once() functions

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация