You are here: Re: Why is "include" printing my code instead of executing it? « PHP Programming Language « IT news, forums, messages
Re: Why is "include" printing my code instead of executing it?

Posted by Good Man on 10/24/07 19:39

"laredotornado@zipmail.com" <laredotornado@zipmail.com> wrote in
news:1193253616.087715.41200@t8g2000prg.googlegroups.com:

> Hi,
>
> I'm using PHP 4.4.4 with Apache 2 on Fedora Linux. I have a page,
> which contains (roughly)
>
> $sub_cat_name_arr = split(",",
> trim($_REQUEST[PROD_SUB_CATEGORIES_ID_PARAM]));
> foreach ($sub_cat_name_arr as $sub_cat_name) {
> /* Processing */
>
> include("add_product_response.inc");
> } // foreach
>
> header("confirmation.html");
>
> But what is happening is that the contents of
> "add_product_response.inc" (which only contain PHP code that doesn't
> generate HTML) are being printed out to the screen instead of being
> executed. Any idea why this is happening and how I can change the
> behavior so that the code in the include file is executed?
>
> Thanks, - Dave
>

change the extension and call "add_product_response.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

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