用ftp函数:
ftp_connect :打开ftp链接。
ftp_login: 等入ftp服务器。
ftp_put :文件上传。
ftp_quit :关闭ftp链接。example: upload.php
<html>
<head>
<title>文件上传到服务器</title>
</head>
<body>
<?
$con=ftp_connect("yourhost",21(;
ftp_login($con,"webuuser","password");
ftp_put($con,$userfile,$userfile,FTP_BINARY);
echo ("文件$userfile 已经上传到服务器!");
ftp_quit($con);
?>
</body>
</html>
ftp_connect :打开ftp链接。
ftp_login: 等入ftp服务器。
ftp_put :文件上传。
ftp_quit :关闭ftp链接。example: upload.php
<html>
<head>
<title>文件上传到服务器</title>
</head>
<body>
<?
$con=ftp_connect("yourhost",21(;
ftp_login($con,"webuuser","password");
ftp_put($con,$userfile,$userfile,FTP_BINARY);
echo ("文件$userfile 已经上传到服务器!");
ftp_quit($con);
?>
</body>
</html>
解决方案 »
- 高手请进....数据表字段的值全被清空
- php 执行固定内容的邮件发送
- 能否获得IFRAME的页面地址?
- 西安招聘PHP工程师
- win2000 +apache2+php5+mysql4+zend安装后,访问数据库提示#2003 - 服务器没有响应
- 连接access成功,但是却读不出来里面的数据,急!!!
- [求救]如何利用perl兼容的正则表达式分析出关键字前后的<td>
- 需要做做电子商务那些需求分析,怎样规划比较好?
- PHP环境下多选框问题?
- 判断是否数字型的JavaScript函数是什么?
- 我有一个单行文本框,要求该值必须为0-9之间的数字,并且最大长度不能超过10个字符,<10可以,不知怎么写认证函数,请高手赐教!!!
- 北京的编程爱好者们,有没有要合租房子的&???
我是要把客户端的大量图片传到WEB服务器上。
why not use form? 能说说原因吗?
只需要一个<input type="file" name="file">
和一个<input type="button" name="Submit" value="Submit">
就可以了
he don't like it so that he ask for other solution.
but in my mind,he were a fool.
you can design a dll or other way that can be run on the web server.
it just like the COM+ run in IIS.
you can send the info to the dll to upload it.