You are here: Re: How to echo content of a file? « PHP Language « IT news, forums, messages
Re: How to echo content of a file?

Posted by Kimmo Laine on 10/30/30 11:25

<talthen.z-serwera.o2@nospam.pl> kirjoitti
viestissδ:df55ub$9jl$1@atlantis.news.tpi.pl...
> "Kimmo Laine" <eternal.erectionN0.5P@Mgmail.com>
>
>> ob_start();
>> include('file');
>> $x = ob_get_clean();
>> echo $x;
>
> Well.. it doesn't work. I changed it to:
> <?
> $hej=5;
> ob_start();
> include('file');
> $x = ob_get_clean();
> ob_end_clean();
> echo $x;
> ?>
>
> But still it shows me non parsed "file".
>


Well then you have to start thinking why include does not parse the file.
For example: maybe it hasn't got the <?php ?> tags around it? I can't think
of that many reasons why include wouldn't parse a file, but if it does, and
when it does, that's how you get the output of it. Just find out why parsing
fails.

--
SETI @ Home - Donate your cpu's idle time to science.
Further reading at <http://setiweb.ssl.berkeley.edu/>
Kimmo Laine <eternal.erectionN0@5P4Mgmail.com>

 

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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация