Reply to Re: Prbolem Showing Images

Your name:

Reply:


Posted by Rik on 03/14/07 08:28

Gladen Blackshield <gladen@verizon.net> wrote:
> Each and every image I attempt to display (either through striaght PHP
> or a
> call through an IMG link) shows up as RAW-DATA text.
>

> ?PNG  IHDRôiåLM@ IDATxo¬½Y",¹Z&ö

> Putting in the HEADER command nets:
>
> Warning: Cannot modify header information - headers already sent by
> (output
> started at /home/karstens/public_html/test/imgtest.php:9) in
> /home/karstens/public_html/test/imgtest.php on line 11
>
> and then the file output as raw data.

Yes, the header() should come _before_ any other output. You output
something on line 9 (or before). Either this should not be outputted, or
the header() function should be earlier in the script. Keep in mind that
any whitespace/characters outside <?php ?> tags are considered output, so
in this file:

-----wrong.php---
<?php
$foo = 'bar';
?>

<?php
//rest of code
------------------

Output will have started on line 4, so no header can be send.
--
Rik Wasmus
Posted on Usenet, not any forum you might see this in.
Ask Smart Questions: http://tinyurl.com/anel

[Back to original 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

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