Re: reading and writing to remote files (not log entries)

From: Date: Wed, 22 Nov 2000 03:38:29 +0000
Subject: Re: reading and writing to remote files (not log entries)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-26575@lists.php.net to get a copy of this message
On Wed, 22 Nov 2000, Dan Troxell wrote: > Hello, > > I'm trying to edit and qualify files placed in a respository before > publishing. Knowing that this is a simplistic question, > Is there a method that can be used to dynamically edit remote files? > > I've been trying to pass the contents of a > <TEXTAREA name="text" formfield with >readfile($filename)</textarea> > and then passing $text to $PHP_SELF using an <input type=hidden input field. > > is it possible to open a file with fsockopen() and read and write to a file? > > Obviously, I'm doing something wrong, does anyone have any suggestions? > > thanks, > Dan If I understand correctly, you do not need the hidden field; you should be able to insert the file into the textarea as you are doing and edit it, then just hit the submit (or however named) form button to pass it, as $text, to the next script which presumably will use fopen and fputs to write to a target file. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#26575) next »