fputs of a textarea write a dos file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cdt sylvestre

    fputs of a textarea write a dos file

    hi

    i have a form with a textarea
    on the action page i write its content with fopen and fputs

    but it s writing a dos file (i m on a linux server)

    thx all


  • Markus L.

    #2
    Re: fputs of a textarea write a dos file

    cdt sylvestre wrote:[color=blue]
    > hi
    >
    > i have a form with a textarea
    > on the action page i write its content with fopen and fputs
    >
    > but it s writing a dos file (i m on a linux server)
    >
    > thx all
    >
    >[/color]

    What do you mean with "dos file"? Do you meen the end of line symbol \r\n?

    If so replace all \r\n with \n before writing the file.

    --
    -------------------------------------------------------
    Try this: SCA the Smart Class Archive for PHP

    -------------------------------------------------------

    Comment

    • Alvaro G. Vicario

      #3
      Re: fputs of a textarea write a dos file

      *** cdt sylvestre escribió/wrote (Sat, 29 Jan 2005 10:52:05 +0100):[color=blue]
      > i have a form with a textarea
      > on the action page i write its content with fopen and fputs
      >
      > but it s writing a dos file (i m on a linux server)[/color]

      The form contains what's sent by the client. If it's a Windows browser you
      can't force it to write Unix carriage returns. However, you can process the
      input in a variety of ways.


      --
      -+ Álvaro G. Vicario - Burgos, Spain
      +- http://www.demogracia.com (la web de humor barnizada para la intemperie)
      ++ Manda tus dudas al grupo, no a mi buzón
      -+ Send your questions to the group, not to my mailbox
      --

      Comment

      • cdt sylvestre

        #4
        Re: fputs of a textarea write a dos file

        thx


        "Markus L." <nobody@proje ct-sca.org> a écrit dans le message de
        news:41fb72c4$0 $24760$91cee783 @newsreader02.h ighway.telekom. at...[color=blue]
        > cdt sylvestre wrote:[color=green]
        > > hi
        > >
        > > i have a form with a textarea
        > > on the action page i write its content with fopen and fputs
        > >
        > > but it s writing a dos file (i m on a linux server)
        > >
        > > thx all
        > >
        > >[/color]
        >
        > What do you mean with "dos file"? Do you meen the end of line symbol \r\n?
        >
        > If so replace all \r\n with \n before writing the file.
        >
        > --
        > -------------------------------------------------------
        > Try this: SCA the Smart Class Archive for PHP
        > http://www.project-sca.org
        > -------------------------------------------------------[/color]


        Comment

        Working...