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

Posted by grimrob on 02/19/07 23:29

On 14 Feb, 03:29, Curtis <zer0d...@verizon.net> wrote:
> Paul Lautman wrote:
> > grim...@blackbelts.co.uk wrote:
> >> fprintf just is not working. I am using PHP Version 4.3.9. Whatever I
> >> do fprintf just fails.
>
> >> For example:
>
> >> fwrite($Handle, 'A1');
> >> fprintf($Handle, 'A2);
>
> >> The first line always works, the second always fails. Likewise any
> >> other example.
>
> >> Suggestions?
>
> > 'A2' isn't a format string?
>
> No, that's not the issue, but unless he needs to use printed
> formatting, there's no real reason to use fprintf over fwrite.
>
> @Original Poster: how does fprintf fail, do you get an error, or is
> the input not written how you expected? You need to give details, or
> no one can help you.
>
> In the meantime, try reading the manual: <http://php.net/fprintf>- Hide quoted text -
>
> - Show quoted text -

It gives an run time error because none of the statements below it are
executed.

I got round it by using sprintf (exactly the same apart from the
different first argument) into a string, and then fwrite.

Rob

 

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

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