Autor Beitrag
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 04.09.03 13:34 
hallo !!!

ich habe folgenden code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
procedure UploadFile(Filename: string);
var
  Stream: TIdMultiPartFormDataStream;
  StringStream: TStringStream;

begin
Stream := TIdMultiPartFormDataStream.Create;
StringStream := TStringStream.Create('');
try
  Stream.AddFile('datei',Filename, '');
  form1.IdHTTP1.Post(uploadurl, Stream, StringStream);
  uploadform.Memo1.lines.add ('Serverantwort: '+StringStream.DataString);
  uploadform.Memo1.lines.add ('Datei erfolgreich übertragen');
finally
  Stream.Free;
  StringStream.Free;
end;
end;


dieser code sollte eigendlich eine datei per HTTP auf einen server schieben. der PHP Code schaut so aus:
ausblenden Quelltext
1:
2:
3:
4:
5:
<?php
$file = $_SERVER[DOCUMENT_ROOT] . "/omgware/" . $_FILES['datei']['name'];
if (!move_uploaded_file($_FILES['datei']['tmp_name'], $file))
 die("cp not able");
?>


aber es geht nicht. kann mir jemand sagen, wo der fehler liegt ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 04.09.03 13:58 
ok das problem hat sich grad erledigt !

wenn ich den source auf dem PC meines Freundes compliliere dann geht alles wunderbar.

ich werd mich jetzt also mal mit meinem Delphi und den Idndy prügeln !!

@mod: bitte Beitrag löschen ! Sorry.

_________________
In the beginning was the word.
And the word was content-type: text/plain.