AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi Datei (herauf)laden bei nem FTP
Thema durchsuchen
Ansicht
Themen-Optionen

Datei (herauf)laden bei nem FTP

Ein Thema von toredo · begonnen am 18. Jul 2006 · letzter Beitrag vom 22. Feb 2008
Antwort Antwort
Seite 2 von 3     12 3      
toredo

Registriert seit: 6. Apr 2006
Ort: Oberriet
210 Beiträge
 
Delphi 7 Enterprise
 
#11

Re: Datei (herauf)laden bei nem FTP

  Alt 18. Jul 2006, 22:06
hay,

hier ist ein fehler drin aber wo?
putfile('85.10.200.141', 'tjo', 'lol', 'D:\Bally.exe', '\html\Bally.exe')
mfG toredo
Benj Meier
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#12

Re: Datei (herauf)laden bei nem FTP

  Alt 18. Jul 2006, 22:15
Zitat von toredo:
hay,

hier ist ein fehler drin aber wo?
putfile('85.10.200.141', 'tjo', 'lol', 'D:\Bally.exe', '\html\Bally.exe')
Woher weißt du, dass da ein Fehler drinne ist?
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
toredo

Registriert seit: 6. Apr 2006
Ort: Oberriet
210 Beiträge
 
Delphi 7 Enterprise
 
#13

Re: Datei (herauf)laden bei nem FTP

  Alt 18. Jul 2006, 22:18
ich hab einfach mal ein project gemacht und dann nen button gemacht bei dem habe ich dann diese zeile eingefügt und halt noch die function oben.
dann hab ich auch auf den knopf gedrückt und irgendwas war am laden für etwa zwei sekunden und dann hab ich auf dem ftp nachgeschaut ob was passiert ist, aber die datei war nicht oben...



mfG toredo
Benj Meier
  Mit Zitat antworten Zitat
Benutzerbild von ErazerZ
ErazerZ

Registriert seit: 27. Mai 2005
Ort: Baden
315 Beiträge
 
Delphi 2007 Enterprise
 
#14

Re: Datei (herauf)laden bei nem FTP

  Alt 18. Jul 2006, 23:07
Zitat von capo:
hi

was bedeutet?
InternetOpen('myagent', INTERNET_OPEN_TYPE_DIRECT, nil, nil, 0); gruss, capo
Zitat:
InternetOpen

Initialises the WinInet API.

function InternetOpen(
lpszAgent: PChar;
dwAccessType: DWORD;
lpszProxy: PChar;
lpszProxyBypass: PChar;
dwFlags: DWORD): HINTERNET;

Parameters:

lpszAgent
Name of the calling application (for example 'PChar(Application.Title)'). This is used as the user agent for HTTP protocol.

dwAccessType
Access type required, use one of:

INTERNET_OPEN_TYPE_DIRECT
Resolve all host names locally.

INTERNET_OPEN_TYPE_PRECONFIG
Retrieve proxy or direct configuration from the registry.

INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY
Retrieves proxy or direct configuration from the registry and prevents the use of any start-up script.

INTERNET_OPEN_TYPE_PROXY
Requests passed on to the proxy. If a proxy bypass list is supplied and the name is on that list then INTERNET_OPEN_TYPE_DIRECT is used instead.

lpszProxy
If dwAccessType is set to INTERNET_OPEN_TYPE_PROXY then this should be the name of the proxy server(s) to use. WinInet API functions recognise only CERN type proxies (HTTP only) and TIS FTP gateway (FTP only). If Internet Explorer is installed then SOCKS proxy are also supported. For all other values of dwAccessType this should be set to nil.

lpszProxyBypass
String containing an optional list of host names or IP addresses, which should not be routed through the proxy. If dwAccessType is not INTERNET_OPEN_TYPE_PROXY then this parameter is ignored and should be set to nil.

dwFlags
Various configuration options. Use one or more of:

INTERNET_FLAG_ASYNC
Makes only asynchronous requests.

INTERNET_FLAG_FROM_CACHE
All entries are returned from the local cache. Requests will fail if the item is not in the local cache.

INTERNET_FLAG_OFFLINE
Same as INTERNET_FLAG_FROM_CACHE

Returns: Handle for use with the other WinInet API functions or nil if the function fails in which case details of the specific error can be found by calling GetLastError().

Note:

* InternetOpen should be the first WinInet API function called by the application.
* When the application finishes using the WinInet API it should call InternetCloseHandle to free the handle and any associated resources.
* Applications may make more than one call to InternetOpen (although only one is required).
und toredo ich glaub vielleicht ist dein login falsch? oder der ordner existiert nicht oder pfad ist ungültig?
  Mit Zitat antworten Zitat
toredo

Registriert seit: 6. Apr 2006
Ort: Oberriet
210 Beiträge
 
Delphi 7 Enterprise
 
#15

Re: Datei (herauf)laden bei nem FTP

  Alt 19. Jul 2006, 09:44
[quote="ErazerZ"]
Zitat von capo:
und toredo ich glaub vielleicht ist dein login falsch? oder der ordner existiert nicht oder pfad ist ungültig?
sollte eigentlich alles stimmen:putfile('85.10.200.141', 'tjo', 'lol', 'D:\Bally.exe', '\html\Bally.exe') die ip stimmt 100%ig, benutzername und pw hab ich auch, ich kann mich mit diesem zeug auch mit jedem ftp-clienten einloggen. und die datei D:\Bally.exe exestiert natürlich auch.
und auf dem ftp sind halt so verschiedene ordner: backup, atd, files, html...
und wenn ich dateien rauflade muss ich die ja in den html-ordner reinmachen aber hier klappts irgendwie nicht, weil die datei will einfach nicht da rein...




mfG toredo
Benj Meier
  Mit Zitat antworten Zitat
Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.755 Beiträge
 
Delphi 10.4 Sydney
 
#16

Re: Datei (herauf)laden bei nem FTP

  Alt 19. Jul 2006, 10:41
ist der Server vielleicht eine Linux/Unix Box?

Dann kannst Du mal '/html/Bally.exe' probieren.

Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat
toredo

Registriert seit: 6. Apr 2006
Ort: Oberriet
210 Beiträge
 
Delphi 7 Enterprise
 
#17

Re: Datei (herauf)laden bei nem FTP

  Alt 19. Jul 2006, 11:09
thx, jetzt klappt es
gibt es auch ne getfile-function die etwa gleich aufgebaut ist?


mfG toredo
Benj Meier
  Mit Zitat antworten Zitat
Benutzerbild von ErazerZ
ErazerZ

Registriert seit: 27. Mai 2005
Ort: Baden
315 Beiträge
 
Delphi 2007 Enterprise
 
#18

Re: Datei (herauf)laden bei nem FTP

  Alt 19. Jul 2006, 11:50
ja, FtpPutFile mit FtpGetFile verändern ..
Delphi-Quellcode:
function FtpGetFile(
    hConnect: HINTERNET;
    lpszRemoteFile: PChar;
    lpszNewFile: PChar;
    fFailIfExists: BOOL;
    dwFlagsAndAttributes: DWORD;
    dwFlags: DWORD;
    dwContext: DWORD): BOOL
  Mit Zitat antworten Zitat
toredo

Registriert seit: 6. Apr 2006
Ort: Oberriet
210 Beiträge
 
Delphi 7 Enterprise
 
#19

Re: Datei (herauf)laden bei nem FTP

  Alt 19. Jul 2006, 15:46
war eigentlich ne dumme frage...

danke für die hilfe


mfG toredo
Benj Meier
  Mit Zitat antworten Zitat
capo

Registriert seit: 7. Jul 2006
453 Beiträge
 
Delphi 11 Alexandria
 
#20

Re: Datei (herauf)laden bei nem FTP

  Alt 19. Jul 2006, 16:02
@ErazerZ

danke für deine erklärungen

capo
Hotte
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 3     12 3      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:33 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz