You are here: Re: heardoc problem « PHP Programming Language « IT news, forums, messages
Re: heardoc problem

Posted by Jeff North on 12/09/07 02:24

On Thu, 6 Dec 2007 07:50:42 -0800 (PST), in comp.lang.php JP
<jpsebasti@gmail.com>
<ef6a1f70-013b-478d-8887-901f481e0beb@w28g2000hsf.googlegroups.com>
wrote:

>| I use the VIM editor on Windows (VI for Windows) so not sure that I
>| have any invalid characters since other scripts that I edit with same
>| editor work just fine.
>|
>| Anyway, I tried the following:
>|
>| created a new t.php file containing the following
>| <?php
>| $tst = <<<EOL
>| test
>| EOL;
>| echo "$test\n";
>| ?>
>|
>| One file, I created in VIM and got the same error when executing.
>| Then, I created a new file with Notepad with the same text above.
>| That one runs
>| with no problems. So looks like for heardocs, there is some weirdness
>| with using the VIM
>| editor perhaps!

Check VI that it is not saving files as UTF-8 with BOM.
If you open a VI create file in Notepad you may see 1-3 square blocks
at the beginning of the file. This is a good indication that you are
saving your files with UTF-8 with BOM format.
-- -------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
-- -------------------------------------------------------------

 

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

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