通过ftp实现文件上传
<html>
<head><title>文件上传</title>
<body>
<form ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD="POST">
<input type="hidden" name="MAX_FILE_SIZE" VALUE="100000">
<div align="center">
<center>选取文件:
<input type="file" name="userfile">
<input type="submit" name="上传">
</center>
</body>
</html> 这是upload.php文件
<?
$con=ftp_connect("yourhost",21);
ftp_login($con,"webuser","password");
ftp_put($con,$userfile,FTP_BINARY);
echo ("文件$userfile已经上传到服务器了!");
ftp_quit($con);
?>
具体的情况请参见:http://www.chinesehis.com/starry/sread.php?forumid=3&filename=f_8
===============================
请关注我的论坛:http://chinesehis.com/starry/index.php
<html>
<head><title>文件上传</title>
<body>
<form ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD="POST">
<input type="hidden" name="MAX_FILE_SIZE" VALUE="100000">
<div align="center">
<center>选取文件:
<input type="file" name="userfile">
<input type="submit" name="上传">
</center>
</body>
</html> 这是upload.php文件
<?
$con=ftp_connect("yourhost",21);
ftp_login($con,"webuser","password");
ftp_put($con,$userfile,FTP_BINARY);
echo ("文件$userfile已经上传到服务器了!");
ftp_quit($con);
?>
具体的情况请参见:http://www.chinesehis.com/starry/sread.php?forumid=3&filename=f_8
===============================
请关注我的论坛:http://chinesehis.com/starry/index.php
字段