[ LUGOS ] http output

Mitja Zabukovec mitja.zabukovec na rs-pi.com
Tor Mar 6 15:50:39 CET 2001


On Tuesday 06 March 2001 15:19, you wrote:
> Ce te zanima zadeva na splosno je najbolje da si pogledas rfc dokument o
> http.
>
> B.

v bistvu bi rad debugiral svoj php umotvor, ki naj bi uploadal file na
web server brez uporabe browserja, pa ne dela. Web serverju ( Apache )
posljem takole kodo:

POST /test/file-upload.php HTTP/1.0
Accept: image/gif, image/jpeg, text/plain, */*
Host: bad.rs-pi.com
Content-type: multipart/form-data; boundary=--------AaB03x
 
--------AaB03x
Content-Disposition: form-data; name="input_text"
 
Some_text
--------AaB03x
Content-Disposition: form-data; name="userfile"; filename="test.txt"
Content-Type: text/plain
 
Testing file upload.
--------AaB03x--


pri cemer je file-upload.php takale skripta ( in deluje, ce mu posljem
file prek HTML forma ):

$dest_path = 'upload/';
$src_path = '/tmp/';
echo $input_text;
move_uploaded_file($userfile,$dest_path.$HTTP_POST_FILES['userfile']['name']);

lp,
Mitja




Dodatne informacije o seznamu Starilist