You are here: Re: Strange error while trying to set a cookie « PHP Programming Language « IT news, forums, messages
Re: Strange error while trying to set a cookie

Posted by Pedro Graca on 09/27/31 11:37

Fernando Rodríguez wrote:
> Whenever I run a script page, I get this error:
> Warning: Cannot modify header information - headers already sent by (output
> started at c:\proyectos\websites\test\index.php:9) in c:\proyectos\websites\test\index.php
________________________________________________^______________ ...
> on line 11
________^^
>
> My code is:

1 <?
2 $cookieValue = 'abra cadabra, pedo de cabra';
3 setcookie('aTestCookie', $cookieValue, time() + 3600);
4 ?>

> Any ideas? O:-)

Please post the rest of your code

I guess line 3 in the example you posted is actually line 11 in your
*real* script, making line 1 in the example your *real* line 9.

The script you posted had absolutely no reason (*) to issue that
warning.

(*) save auto_prepend_file

--
If you're posting through Google read <http://cfaj.freeshell.org/google>

 

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

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