Q&A
HOME
Tips & Tech
Q&A
Discuss
Download
자유게시판
홍보 / 광고
구인 / 구직
LOGIN
회원가입
★ 파일업로드....
저기요~~
저좀 도와 주세요....
여기 게시판에 있는 소스로 컴파일 해봐도....
컴파일은 되는데... 시행시키면.... XXXX
ㅠ.ㅠ 어떠카죠? ㅠ.ㅠ 도와주세요...
파일 업로드 할수 있게... 도와주세요...
제발.... ㅠ.ㅠ
1
COMMENTS
조규춘
•
2000.06.02 09:53
왕초보 wrote:
> 저기요~~
>
> 저좀 도와 주세요....
>
> 여기 게시판에 있는 소스로 컴파일 해봐도....
>
> 컴파일은 되는데... 시행시키면.... XXXX
>
> ㅠ.ㅠ 어떠카죠? ㅠ.ㅠ 도와주세요...
>
> 파일 업로드 할수 있게... 도와주세요...
>
> 제발.... ㅠ.ㅠ
>
음냐.. FTP를 말씀하시는 거군요.. 푸힝.
자 첫번째 소스... 자료를 선택해서 보내는 소스
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Psock, NMFtp, StdCtrls, ExtCtrls, FileCtrl;
type
TForm1 = class(TForm)
Btn_Connect: TButton;
Lst_SvrFile: TListBox;
Btn_Disconnect: TButton;
FileListBox1: TFileListBox;
DirectoryListBox1: TDirectoryListBox;
DriveComboBox1: TDriveComboBox;
Rad_FileType: TRadioGroup;
NMFTP1: TNMFTP;
procedure Btn_ConnectClick(Sender: TObject);
procedure NMFTP1ListItem(Listing: String);
procedure Lst_SvrFileDblClick(Sender: TObject);
procedure FileListBox1DragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
procedure FileListBox1DragDrop(Sender, Source: TObject; X, Y: Integer);
procedure Lst_SvrFileDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
procedure Lst_SvrFileDragDrop(Sender, Source: TObject; X, Y: Integer);
procedure Btn_DisconnectClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
procedure Dis_File(SvrDir : string);
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.DFM}
procedure TForm1.Btn_ConnectClick(Sender: TObject);
begin
if Form2.ShowModal = mrOk then
begin
try
Lst_SvrFile.Clear;
NMFTP1.Host := Form2.Edt_IP.Text;
NMFTP1.Port := 21;
NMFTP1.UserID := Form2.Edt_User.Text;
NMFTP1.Password := Form2.Edt_Passwd.Text;
NMFTP1.Connect;
NMFTP1.List;
Lst_SvrFile.Items.Add(' [..]');
except
NMFTP1.Disconnect;
Lst_SvrFile.Clear;
end;
end;
end;
procedure TForm1.NMFTP1ListItem(Listing: String);
begin
if (Listing[1] = '-') or (Listing[1] = 'd') or (Listing[1] = 'r') then
Lst_SvrFile.Items.Add(Listing);
end;
procedure TForm1.Lst_SvrFileDblClick(Sender: TObject);
var
SvrFile, SvrDir : string;
begin
SvrFile := Lst_SvrFile.Items.Strings[Lst_SvrFile.ItemIndex];
if UpperCase(Copy(SvrFile, 1, 1)) = 'D' then
begin
SvrDir := NMFTP1.CurrentDir + '/' + Copy(SvrFile, LastDelimiter(' ', SvrFile) + 1, Length(SvrFile));
Dis_File(SvrDir);
exit;
end;
if SvrFile = ' [..]' then begin
if LastDelimiter('/', NMFTP1.CurrentDir) = 1 then exit;
SvrDir := Copy(NMFTP1.CurrentDir, 0, LastDelimiter('/', NMFTP1.CurrentDir) - 1);
Dis_File(SvrDir);
exit;;
end;
end;
procedure TForm1.Dis_File(SvrDir : string);
begin
Lst_SvrFile.Clear;
Lst_SvrFile.Items.Add(' [..]');
NMFTP1.ChangeDir(SvrDir);
NMFTP1.List;
end;
procedure TForm1.FileListBox1DragOver(Sender, Source: TObject; X,
Y: Integer; State: TDragState; var Accept: Boolean);
begin
if Source is TListBox then Accept := true;
end;
procedure TForm1.FileListBox1DragDrop(Sender, Source: TObject; X,
Y: Integer);
var
DownFile, SvrFile : string;
begin
if Source is TListBox then
begin
SvrFile := Lst_SvrFile.Items.Strings[Lst_SvrFile.ItemIndex];
if Rad_FileType.ItemIndex = 0 then NMFTP1.Mode(MODE_ASCII)
else NMFTP1.Mode(MODE_IMAGE);
DownFile := NMFTP1.CurrentDir + '/' + Copy(SvrFile, LastDelimiter(' ', SvrFile) + 1, Length(SvrFile));
NMFTP1.Download(DownFile, Copy(SvrFile, LastDelimiter(' ', SvrFile) + 1, Length(SvrFile)));
FileListBox1.Update();
end;
end;
procedure TForm1.Lst_SvrFileDragOver(Sender, Source: TObject; X,
Y: Integer; State: TDragState; var Accept: Boolean);
begin
if Source is TFileListBox then Accept := true;
end;
procedure TForm1.Lst_SvrFileDragDrop(Sender, Source: TObject; X,
Y: Integer);
begin
if Source is TFileListBox then
begin
if Rad_FileType.ItemIndex = 0 then NMFTP1.Mode(MODE_ASCII)
else NMFTP1.Mode(MODE_IMAGE);
NMFTP1.Upload(FileListBox1.FileName, ExtractFileName(FileListBox1.FileName));
Dis_File(NMFTP1.CurrentDir);
end;
end;
procedure TForm1.Btn_DisconnectClick(Sender: TObject);
begin
NMFTP1.Disconnect;
Lst_SvrFile.Clear;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
NMFTP1.Disconnect;
end;
end.
두번째로 로긴 연결하는 소스(소스라기 보다는 기냥 폼....)
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm2 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edt_IP: TEdit;
Edt_User: TEdit;
Edt_Passwd: TEdit;
Button1: TButton;
Button2: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.DFM}
end.
행복하셔요.. 푸히~! 조규춘올림.
0
0
삭제
수정
댓글
(NOTICE) You must be
logged in
to comment on this post.
김대성
•
2000.06.02 21:07
6
COMMENTS
/
0
LIKES
헤메고 있습니당.. 도와 주세여..
최용일
•
2000.06.02 21:29
김대성
•
2000.06.02 23:57
최용일
•
2000.06.03 00:14
김대성
•
2000.06.03 00:36
최용일
•
2000.06.03 01:07
타락천사
•
2000.06.02 22:21
지나가는이....
•
2000.06.02 21:00
1
COMMENTS
/
0
LIKES
MDI에서 CHILD폼 컨트롤....
parkisu
•
2000.06.03 09:13
지나가는이.... wrote: > 다른게 아니오라.... > 차일드폼에서 다른 차일드폼을 생성시킬려고 하는데요.....
궁금이
•
2000.06.02 20:59
1
COMMENTS
/
0
LIKES
디폴트 웹브라우저 바꾸는 방법???
조규춘
•
2000.06.02 21:33
궁금이 wrote: > 제가 프로그램하다가 웹브라우저를 이용하는 프로그램을 > > 작성하는데 디폴트 브라...
델_맹
•
2000.06.02 20:55
1
COMMENTS
/
0
LIKES
SQL문(Update)에서요 두가지 조건은....(소스포함)
mute
•
2000.06.02 23:35
델_맹 wrote: > 안녕하십니까, 델파이 관계자 여러분들......!!! > 한.델이 정상으로 돌아와서 정말 다행...
김봉준
•
2000.06.02 20:49
1
COMMENTS
/
0
LIKES
에디터를 만들고 싶은데요
조규춘
•
2000.06.02 21:29
김봉준 wrote: > 나모 웹에디터와 똑같은 기능은 아니지만 비슷한 기능을 가진 > > 저작도구를 만들려...
미친척
•
2000.06.02 20:46
6
COMMENTS
/
0
LIKES
^^ 황당한 질문은 계속돼야 한당.쭈우~~~욱(hurry up)
강인규
•
2000.06.02 23:08
Tdate형이 있습니다. var editday : Tdate; begin edit1.text:=formatdatetime('yyyy-mm-dd',dat...
홍세비
•
2000.06.02 20:53
미친척 wrote: > > 안뇽하십니까 답변 감솨 함당... > > 지가엽... 그러니까...에디트박스1 하구 ...
타락천사
•
2000.06.02 22:24
안녕하세여.. 타락임다..^^ edit1.text:=formatdatetime('yyyy-mm-dd', '2000-5-3'); 왕초보 타락천...
미친척
•
2000.06.02 22:29
타락천사 wrote: > 안녕하세여.. 타락임다..^^ > > edit1.text:=formatdatetime('yyyy-mm-dd', '2000-5...
미친척
•
2000.06.02 22:25
감솨 감솨 그런디엽... 아래의 소스중에서 변수의 선언은 어떤형으로 한건가엽.......궁금함당... 여...
유레카
•
2000.06.03 05:19
쿼리문에 사용되는 파라미터변수(p1,p2,p3)는 프로그램에서 선언하시지 않고 사용하는 DB에 정의한 타입으...
류응철
2000.06.02 20:56
0
COMMENTS
/
0
LIKES
폼에서 워드로 or 버튼클릭으로 워드 띄우기 여러가지 ㅠ.ㅠ
미친척
•
2000.06.02 20:13
3
COMMENTS
/
0
LIKES
초보의 황당한 질문임당....... (hurry up)
최용일
•
2000.06.02 20:29
헬프의 date/time routines 항목을 찾아보세요. ^^ 미친척 wrote: > > 변수에서 날짜에 관계된 ...
어린왕자
•
2000.06.02 20:36
미친척 wrote: > > 변수에서 날짜에 관계된 변수도 있나엽.. > 전 integer,string 이거 두개 밖에 ...
최용일
•
2000.06.02 20:32
TDateTime = TTime = TDate = Double > 안녕하세요..델초보입니다.. 어린왕자입니다.. > TDateTime형이...
김영남
2000.06.02 18:59
0
COMMENTS
/
0
LIKES
트랜잭션 처리 문제 입니다...
김문기
2000.06.02 18:39
0
COMMENTS
/
0
LIKES
QReport로 text file을 처리하는 방법을 알려주세요.
유레카
2000.06.02 17:57
0
COMMENTS
/
0
LIKES
DBLookupComboBox를 사용하세요.
서정훈
2000.06.02 17:57
0
COMMENTS
/
0
LIKES
이미지 로딩과 메모리 문제
이대희
2000.06.02 11:15
0
COMMENTS
/
0
LIKES
[질문..꼭 좀 부탁]사내에서 쓸수 있는 메세지 서비스
왕초보
•
2000.06.02 09:10
2
COMMENTS
/
0
LIKES
dbcombobox사용법좀 알려주세요
조규춘
•
2000.06.02 09:30
왕초보 wrote: > 저는 델파이 초자입니다. > 저는 master table(필드는 아파트이름,단지,동,호,이름)과 A...
사발우성
•
2000.06.02 18:32
저두 초보임다....제가 지난 번에 질문 했던내용이라서리.....^^ 콤보박스를 사용해보세요.. 콤보박스를 ...
서현우
•
2000.06.02 08:52
1
COMMENTS
/
0
LIKES
서버에 접속되어 있는 클라이언트이 수를 알고 싶은데요..
조규춘
•
2000.06.02 10:32
서현우 wrote: > 안녕하세요... > 궁금한게 있어서요... > 서버에 접속되어 있는 클라이언트의 수를 알...
Mr.Q
2000.06.02 08:40
0
COMMENTS
/
0
LIKES
BeginUpdate, EndUpdate
leollo
•
2000.06.02 08:37
1
COMMENTS
/
0
LIKES
웹브라우져 목록보기-가져오는방법
조규춘
•
2000.06.02 09:47
leollo wrote: > 안녕하세요 > 인터넷관련 프로그램을 짤려고 하는데요. > 익스플로러 띄우면 목록보기...
왕초보
2000.06.02 08:06
0
COMMENTS
/
0
LIKES
웹에서... 검색 하려면.....
[델파이]
•
2000.06.02 08:03
2
COMMENTS
/
0
LIKES
윈도우 엑세스 불가능하게..
홍세비
•
2000.06.02 19:05
[델파이] wrote: > 내가 만든 프로그램말고는 다른것(바탕화면,작업표시줄등) > > 모든윈도우기능을 ...
타락천사
•
2000.06.02 18:16
안녕하세여.. 타락임다..^^ 글쎄여.. 여러 방법이 있겠지만,, 제 생각엔 마우스커서를 받는 지역을 ...
왕초보
•
•
2000.06.02 08:03
1
COMMENTS
/
3
LIKES
★ 파일업로드....
저기요~~ 저좀 도와 주세요.... 여기 게시판에 있는 소스로 컴파일 해봐도.... 컴파일은 되는데... 시행시키면.... XXXX ㅠ.ㅠ 어떠카죠? ㅠ.ㅠ 도와주세요... 파일 업로드 할수 있게... 도와주세요... 제발.... ㅠ.ㅠ
조규춘
•
2000.06.02 09:53
왕초보 wrote: > 저기요~~ > > 저좀 도와 주세요.... > > 여기 게시판에 있는 소스로 컴파일 해봐...
왕초보
2000/06/02 08:03
Views
736
Likes
3
Comments
1
Reports
0
Tag List
수정
삭제
목록으로
한델 로그인 하기
로그인 상태 유지
아직 회원이 아니세요? 가입하세요!
암호를 잊어버리셨나요?
> 저기요~~
>
> 저좀 도와 주세요....
>
> 여기 게시판에 있는 소스로 컴파일 해봐도....
>
> 컴파일은 되는데... 시행시키면.... XXXX
>
> ㅠ.ㅠ 어떠카죠? ㅠ.ㅠ 도와주세요...
>
> 파일 업로드 할수 있게... 도와주세요...
>
> 제발.... ㅠ.ㅠ
>
음냐.. FTP를 말씀하시는 거군요.. 푸힝.
자 첫번째 소스... 자료를 선택해서 보내는 소스
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Psock, NMFtp, StdCtrls, ExtCtrls, FileCtrl;
type
TForm1 = class(TForm)
Btn_Connect: TButton;
Lst_SvrFile: TListBox;
Btn_Disconnect: TButton;
FileListBox1: TFileListBox;
DirectoryListBox1: TDirectoryListBox;
DriveComboBox1: TDriveComboBox;
Rad_FileType: TRadioGroup;
NMFTP1: TNMFTP;
procedure Btn_ConnectClick(Sender: TObject);
procedure NMFTP1ListItem(Listing: String);
procedure Lst_SvrFileDblClick(Sender: TObject);
procedure FileListBox1DragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
procedure FileListBox1DragDrop(Sender, Source: TObject; X, Y: Integer);
procedure Lst_SvrFileDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
procedure Lst_SvrFileDragDrop(Sender, Source: TObject; X, Y: Integer);
procedure Btn_DisconnectClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
procedure Dis_File(SvrDir : string);
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.DFM}
procedure TForm1.Btn_ConnectClick(Sender: TObject);
begin
if Form2.ShowModal = mrOk then
begin
try
Lst_SvrFile.Clear;
NMFTP1.Host := Form2.Edt_IP.Text;
NMFTP1.Port := 21;
NMFTP1.UserID := Form2.Edt_User.Text;
NMFTP1.Password := Form2.Edt_Passwd.Text;
NMFTP1.Connect;
NMFTP1.List;
Lst_SvrFile.Items.Add(' [..]');
except
NMFTP1.Disconnect;
Lst_SvrFile.Clear;
end;
end;
end;
procedure TForm1.NMFTP1ListItem(Listing: String);
begin
if (Listing[1] = '-') or (Listing[1] = 'd') or (Listing[1] = 'r') then
Lst_SvrFile.Items.Add(Listing);
end;
procedure TForm1.Lst_SvrFileDblClick(Sender: TObject);
var
SvrFile, SvrDir : string;
begin
SvrFile := Lst_SvrFile.Items.Strings[Lst_SvrFile.ItemIndex];
if UpperCase(Copy(SvrFile, 1, 1)) = 'D' then
begin
SvrDir := NMFTP1.CurrentDir + '/' + Copy(SvrFile, LastDelimiter(' ', SvrFile) + 1, Length(SvrFile));
Dis_File(SvrDir);
exit;
end;
if SvrFile = ' [..]' then begin
if LastDelimiter('/', NMFTP1.CurrentDir) = 1 then exit;
SvrDir := Copy(NMFTP1.CurrentDir, 0, LastDelimiter('/', NMFTP1.CurrentDir) - 1);
Dis_File(SvrDir);
exit;;
end;
end;
procedure TForm1.Dis_File(SvrDir : string);
begin
Lst_SvrFile.Clear;
Lst_SvrFile.Items.Add(' [..]');
NMFTP1.ChangeDir(SvrDir);
NMFTP1.List;
end;
procedure TForm1.FileListBox1DragOver(Sender, Source: TObject; X,
Y: Integer; State: TDragState; var Accept: Boolean);
begin
if Source is TListBox then Accept := true;
end;
procedure TForm1.FileListBox1DragDrop(Sender, Source: TObject; X,
Y: Integer);
var
DownFile, SvrFile : string;
begin
if Source is TListBox then
begin
SvrFile := Lst_SvrFile.Items.Strings[Lst_SvrFile.ItemIndex];
if Rad_FileType.ItemIndex = 0 then NMFTP1.Mode(MODE_ASCII)
else NMFTP1.Mode(MODE_IMAGE);
DownFile := NMFTP1.CurrentDir + '/' + Copy(SvrFile, LastDelimiter(' ', SvrFile) + 1, Length(SvrFile));
NMFTP1.Download(DownFile, Copy(SvrFile, LastDelimiter(' ', SvrFile) + 1, Length(SvrFile)));
FileListBox1.Update();
end;
end;
procedure TForm1.Lst_SvrFileDragOver(Sender, Source: TObject; X,
Y: Integer; State: TDragState; var Accept: Boolean);
begin
if Source is TFileListBox then Accept := true;
end;
procedure TForm1.Lst_SvrFileDragDrop(Sender, Source: TObject; X,
Y: Integer);
begin
if Source is TFileListBox then
begin
if Rad_FileType.ItemIndex = 0 then NMFTP1.Mode(MODE_ASCII)
else NMFTP1.Mode(MODE_IMAGE);
NMFTP1.Upload(FileListBox1.FileName, ExtractFileName(FileListBox1.FileName));
Dis_File(NMFTP1.CurrentDir);
end;
end;
procedure TForm1.Btn_DisconnectClick(Sender: TObject);
begin
NMFTP1.Disconnect;
Lst_SvrFile.Clear;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
NMFTP1.Disconnect;
end;
end.
두번째로 로긴 연결하는 소스(소스라기 보다는 기냥 폼....)
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm2 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edt_IP: TEdit;
Edt_User: TEdit;
Edt_Passwd: TEdit;
Button1: TButton;
Button2: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.DFM}
end.
행복하셔요.. 푸히~! 조규춘올림.