upload with a constant file name ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tintin
Forum Newbie
Posts: 13
Joined: Fri Dec 13, 2002 7:13 am

upload with a constant file name ?

Post by tintin »

Hi,

I'd like to upload a text file, whose name is known and without requesting the user to type it or browse the name.

The script will not be called from a HTML page, but from a executable which is able to POST anything (and to use other protocols).

I could split the file, and POST all the lines, but I don't find it very efficient. I could use FTP, but will then have to grant too much rights to the target directory.

I wonder whether it could be possible to do it with the same mechanism as form upload (enctype=multipart/form-data, ...).

Unfortunately, when I set the value for the File input field, it is discarded and the user have to type or browse.

I don't know the appropriate way to do this : any idea ?

Thanks for help.
Post Reply