By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,724 Members | 1,391 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,724 IT Pros & Developers. It's quick & easy.

remote file edit

P: n/a
xEM
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~
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
xEM <xe**@boxmail.biz> wrote:
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)?


Submit the form and read about some filesystem functions like:

http://uk.php.net/manual/en/function.fopen.php
http://uk.php.net/manual/en/function.fwrite.php
http://uk.php.net/manual/en/function.fclose.php

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

HTH;
JOn
Jul 17 '05 #2

P: n/a
xEM
Jon Kraft <jo*@jonux.co.uk> wrote in news:bmopl3$pj9dp$2@ID-
175424.news.uni-berlin.de:
Submit the form and read about some filesystem functions like:


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~
Jul 17 '05 #3

P: n/a
sk
xEM wrote:
Jon Kraft <jo*@jonux.co.uk> wrote
Submit the form and read about some filesystem functions like:


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?


See the stripslashes() string function.


Jul 17 '05 #4

P: n/a
xEM wrote:

Jon Kraft <jo*@jonux.co.uk> wrote in news:bmopl3$pj9dp$2@ID-
175424.news.uni-berlin.de:
Submit the form and read about some filesystem functions like:


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?


$var = stripslashes($var);

Shawn
--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.