ftp.c

来自「linux ftp c port linux ftp c port linux 」· C语言 代码 · 共 43 行

C
43
字号
#include <sys/types.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#include <fcntl.h>#include <unistd.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <netdb.h>#include "MyFtp.h"int main()  {	char host[50] = "www.hcw123.cn",user[50]="3human",passwd[50]="chaoy@1004",remote_name[50]="#",local_name[50]="temp/LS",path[]="/3human";	int port = 22;/* 	char host[50],user[50],passwd[50],remote_name[50],local_name[50];	int port;	printf("\nhost:");	scanf ("%s",host);	getchar();	printf("\nport:");	scanf ("%d",&port);	getchar();	printf("\nuser:");	scanf ("%s",user);	getchar();	printf("\npasswd:");	scanf ("%s",passwd);	getchar();	printf("\nremote_name:");	scanf ("%s",remote_name);	getchar();	printf("\nlocal_name:");	scanf ("%s",local_name);	getchar();*/	ftp(host,port,user,passwd,remote_name,local_name,path);  	exit(0);  }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?