php-windows Digest 20 Jul 2003 22:29:31 -0000 Issue 1832

Topics (messages 20838 through 20839):

Re: file uploading
        20838 by: Luis Ferro

Subject: file uploading
        20839 by: Neil Smith

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message --- It is indeed a HTML/Browser issue... I'm not sure if the filename in the source can be setup by javascript due to security problems (if it was, a malicious web site could receive all the of the user computer that have a known location).

For file upload you can check:

http://www.php.net/manual/en/features.file-upload.php

But, the best solution for your case would thru the use of MOD_FTP, a php extention that allows ftp operations. It is not a standard extention, which means that either php needs to be compiled with it, or if in windows, the .dll and php.ini must be configured correctly (dll placed in extentions directory, and php.ini with the entry in the ";Windows Extensions" area).

Cheers,
Luis Ferro

Achilles Maroulis wrote:

Hi.
Is there a way to auto upload some files to the server?
It is about an intranet application. One pc uses some external programs for
some procedures. The result is a text file wich is stored always in the same
folder with the same name to the client pc. Is there a way php can
auto-upload that file (when asked to do so) without having to submit a form
filled by the user? I don't want to make that folder shared for security
reason.
Is that an html issue?

Thanx in advnace
Achilles







--- End Message ---
--- Begin Message --- No, because you cannot specify (and auto-fill in) the value of a form's upload field (which is required to make use of the $_FILES post array).

This is quite rightly a security feature, else people could script hidden form uploads of say /etc/passwd and so on.

If its a text file you can express in XML, you can upload the data as text to the server with a POST request using the xmlhttp or MSXML.DomDocument.2 interfaces (or the equivalent in Mozilla)

Cheers - Neil Smith.

----------------------------------------------------------------------
Message-ID: <[EMAIL PROTECTED]>
From: "Achilles Maroulis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Date: Sun, 20 Jul 2003 13:13:12 +0300
MIME-Version: 1.0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: file uploading

Hi.
Is there a way to auto upload some files to the server?
It is about an intranet application. One pc uses some external programs for
some procedures. The result is a text file wich is stored always in the same
folder with the same name to the client pc. Is there a way php can
auto-upload that file (when asked to do so) without having to submit a form
filled by the user? I don't want to make that folder shared for security
reason.
Is that an html issue?

Thanx in advnace
Achilles


--- End Message ---

Reply via email to