You are here: Re: Write a binary file « All PHP « IT news, forums, messages
Re: Write a binary file

Posted by Jerry Stuckle on 12/08/07 23:57

zach wrote:
> Can someone help me out, I can't figure out what I'm doing wrong to
> write to a file in binary mode.
>
> What's wrong with my code?
>
> <?php
>
> $fileName = "something.dat";
> $string = "This is a string of text";
>
> $ptr = fopen($fileName, 'wb');
>
> fwrite($ptr, $string);
> fclose($ptr);
>
> ?>
>

What kind of error messages do you get? Or what result indicates you
aren't writing the data correctly?

--
==================
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

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