You are here: Re: wierd error « PHP Programming Language « IT news, forums, messages
Re: wierd error

Posted by Jerry Stuckle on 11/09/53 11:49

Nikola Skoric wrote:
> I have this very simple PHP script:
>
> #!/usr/local/bin/php -q
>
> <?php
> $post="From: \"Burek\" <burek@burek.hr>\\nSubject: foobar\\nNewsgroups:
> hr.test\\n\\nNesto, nesto.';
>
> $command="echo -ne \"mode reader\\npost\\n" . $post . "\\n.\\nquit\\n\"
> | nc news.carnet.hr 119\n";
> echo $command;
> exec($command);
> ?>
>
> And it fails to execute:
> PHP Parse error: parse error in /home/users/n/nick/bin/postFAQ.php on
> line 6
>
> I have dissected the script and found that when I write it this way:
> $command=
> "echo"
> . " -ne \"mode reader\\npost\\n" . $post . "\\n.\\nquit\\n\" | nc
> news.carnet.hr 119\n";
> Then the error is on the line where "echo" is. Now, what am I missing?
>

Nikola,

Check your file to see if you possibly have mismatched double quotes earlier in
your file (or in a file which includes this one).

Normally when I see this it means I've screwed up and had mismatched quotes
earlier in the file.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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