max_input_time=秒数,这里要加大,
upload_max_filesize=2M 这里也要加大
default_socket_timeout=60这里看情况加大,
然后重启IIS
大文件传送,用http方式传是不现实的,传的时间长脚本会超时的你尝试改用ftp传送吧,php中有些关于ftp传文件的函数
以下是php以FTP方式传文件的代码,你参考下
$ftp_server="*.*.*.*"
$ftp_user="lu"
$ftp_pass="loveyou"
//setupaconnectionordie
$conn_id=ftp_connect($ftp_server)ordie("Couldn'tconnectto$ftp_server")
$login_result=ftp_login($conn_id,$ftp_user,$ftp_pass)
if((!$conn_id)||(!$login_result)){
echo"FTPconnectionhasfailed!"
echo"Attemptedtoconnectto$ftp_serverforuser$ftp_user_name"
exit
}else{
echo"Connectedto$ftp_server,foruser$ftp_user_name"
}
//trytologin
$filename=date('Ymd').".xml"
$source_file="/usr/local/IVR/sendwireless/xml/data/".$filename//源地址
echo$source_file
$destination_file="/ITC/admin/logstat/ftplog/".$filename//目标地址
$upload=ftp_put($conn_id,$destination_file,$source_file,FTP_BINARY)ordie("Couldn'tconnectto$ftp_server")
ftp_quit($conn_id)
if(!$upload){
echo"FTPuploadhasfailed!"
}else{
echo"Uploaded$source_fileto$ftp_serveras$destination_file"
}
ftp_close($conn_id)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)