remote file edit

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

    remote file edit

    i want to edit my index.php by www

    i print file in 'textarea':

    <textarea cols="95%" rows="20" name="text">
    <?php
    readfile("../index.php");
    ?>
    </textarea>

    how can i save contents after editing it (editing in this textarea)?


    --
    pozdr.
    xEM~
  • Jon Kraft

    #2
    Re: remote file edit

    xEM <xem_@boxmail.b iz> wrote:
    [color=blue]
    > i want to edit my index.php by www
    >
    > i print file in 'textarea':
    >
    > <textarea cols="95%" rows="20" name="text">
    > <?php
    > readfile("../index.php");
    > ?>
    > </textarea>
    >
    > how can i save contents after editing it (editing in this textarea)?[/color]

    Submit the form and read about some filesystem functions like:





    Make sure "www" can actually modify index.php.

    HTH;
    JOn

    Comment

    • xEM

      #3
      Re: remote file edit

      Jon Kraft <jon@jonux.co.u k> wrote in news:bmopl3$pj9 dp$2@ID-
      175424.news.uni-berlin.de:
      [color=blue]
      > Submit the form and read about some filesystem functions like:[/color]

      that's works, but i have problem:

      after submitting and writting contents of textarea to a output file,
      some special characters like ", ', \ are prefixed (in output file) by \,
      which are unwanted.

      how can i neutralize it?

      --
      pozdr.
      xEM~

      Comment

      • sk

        #4
        Re: remote file edit

        xEM wrote:[color=blue]
        > Jon Kraft <jon@jonux.co.u k> wrote[color=green]
        >>Submit the form and read about some filesystem functions like:[/color]
        >
        > that's works, but i have problem:
        >
        > after submitting and writting contents of textarea to a output file,
        > some special characters like ", ', \ are prefixed (in output file) by \,
        > which are unwanted.
        >
        > how can i neutralize it?[/color]

        See the stripslashes() string function.




        Comment

        • Shawn Wilson

          #5
          Re: remote file edit

          xEM wrote:[color=blue]
          >
          > Jon Kraft <jon@jonux.co.u k> wrote in news:bmopl3$pj9 dp$2@ID-
          > 175424.news.uni-berlin.de:
          >[color=green]
          > > Submit the form and read about some filesystem functions like:[/color]
          >
          > that's works, but i have problem:
          >
          > after submitting and writting contents of textarea to a output file,
          > some special characters like ", ', \ are prefixed (in output file) by \,
          > which are unwanted.
          >
          > how can i neutralize it?[/color]

          $var = stripslashes($v ar);

          Shawn
          --
          Shawn Wilson
          shawn@glassgian t.com

          Comment

          Working...