Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
自从我不得不使用它已经很长时间了......我怎样才能截断fopen()在当前文件指针处打开的文件?
fopen()
如果没有通用解决方案,我在 Windows 上。
由于您使用的是 Windows,请使用以下命令:
_chsize( fileno(f), size);
或 64 位版本:
_chsize_s(_fileno(f), size);
这是一个基于弹簧的应用程序。我在 JSP 中的表单定义如下,
<form:form modelAttribute="article" enctype="multipart/form-data" method="POST" action="${sendE