2009-06-29 15:31 | Posted by Sunshow | Filed Under Linux, Network
curl -H "Expect:" -F "action=upload_mf.php" -F "file=@1246285971.xml;type=text/xml" http://localhost/upload_mf.php 加上"Expect:"的Header是因为Curl会默认带上"Expect: 100-continue",而我用的lighttpd 1.4.18不支持这个Header,会返回417的状态码导致出错 标签:curl, lighttpd, 上传, 文件 相关日志 TestLink文件上传问题修复 (0) [转载+整理]WordPress上传文件类型限制解决办法 (1) Windows API移动文件 (0)
2007-07-06 08:32 | Posted by Sunshow | Filed Under Delphi
function TScanFileThread.MoveFile(FileName: string): Boolean;var F: TShFileOpStruct;begin with F do begin Wnd := Handle; wFunc := FO_MOVE; pFrom := PChar(Directory + FileName + #0#0); pTo := PChar(SaveDirectory + FileName + #0#0); fFlags := FOF_RENAMEONCOLLISION or FOF_NOCONFIRMMKDIR; end; if ShFileOperation(F) = 0 then begin Result := True; end else begin Result := False; end;end; 一开始pFrom和pTo没有以“#0#0”结尾,结果发现在有的机器上能移动成功,有的机器上SHFileOperation返回1026无法转移,查了一下资料 ShFileOperation中的pFrom和pTo中可以包含多个文件名,文件名之间用 '\0' [...]
Recent Comments