Reply to fread/frwite curiousity

Your name:

Reply:


Posted by Shelly on 07/21/05 06:10

I write to a file with fwrite. I do it with wordwrap (which I now think is
unnecessary). In the text area that it appears, it is left adjusted.
Anyway, the command is:

$message = wordwrap($_POST['Message'], 70);

where Message is the name of the text field.

Now when I go to read it, I use fread. The command is:

$message = fread($handle, 5000);

and I put in the text area of the read form:

<textarea name="Message" cols="70" rows="15" readonly="readonly">
<?php echo wordwrap($message, 70); ?></textarea>

Here is the problem. There are about 15 spaces or so before the first bit
of text. After that, everything is fine. It wordwraps fine and does new
paragraphs. I cannot seem to find where those initial spaces entered the
picture.

Shelly

[Back to original 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

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