You are here: Re: Source Displayed With include_once() « PHP Programming Language « IT news, forums, messages
Re: Source Displayed With include_once()

Posted by Richard Levasseur on 08/06/06 07:47

Steve wrote:
> I have just installed Apache 2.2 and PHP 5.1.4 on my Win XP Pro machine.
> If I run phpinfo(), it displays everything correctly. However, on a
> page where I have included a file that contains some functions, it
> merely shows the contents of the included file instead of running the
> function. For instance, I have a function called do_html_header() that
> does just what the name suggests, and I've used it for quite a while.
>
> The top of my page looks like this:
>
> <?php
> include_once("functions.php");
>
> do_html_header("Terms");
> ?>
>
> However, when I view the page source, the actual PHP code is displayed,
> not just the HTML that it is supposed to display. It would seem that
> PHP is installed correctly since phpinfo() works fine. Is there
> something else I'm missing?
>
> Thanks.
>
> Steve

The only reason this would occur, that I can think of, is you don't
have the opening tags in the functions.php file, "<?" or "<?php".

 

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

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