PHP-Webserver:Web服务器上传的文件处理 [英] PHP-Webserver : Uploaded File Handling by a web server

查看:70
本文介绍了PHP-Webserver:Web服务器上传的文件处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我要感谢所有成员的到点社区。这些答案对我在编码和概念方面的知识发展非常有帮助。这是我在社区的第一个问题。我想要一些不明确概念的帮助。



文件上传可以通过客户端使用通用html表单完成,enctype =mutipart / form-data 表示文件



我的问题是如何在Web服务器中接收和存储文件



需要服务器端的方法来清除这个概念。还包括在所遵循的技术中使用MIME类型。



等待回复

First and foremost i would like to thank all the members for a "to the point" community. The answers are very much helpful in the development of my knowledge in my coding and conceptual. This is my first question in the community. And i want some help on an unclear concept.

The File Uploading can be done by client-side with general html forms, with enctype="mutipart/form-data" to denote the "file"

My Question is how is the file 1.received and 2.stored in the Web-Server

The approach from the Server Side is needed to clear the concept. Also include the usage of MIME type in the technique followed.

Waiting for reply

推荐答案

实际上,文件是字节。

如果你把这个文件转换成字节,

然后转换就很简单了。
In fact ,the file is bytes .
If you convert this file to bytes ,
and then it is very simple to transter.


..
经过长时间的搜索和浏览我得出结论



客户端

1.使用html表格上传文件enctype =multipart / form-data(对于文件上传,它必须是)



2.信息作为二进制信息发送,由enctype加密(包括MIME类型)通过您在代码中使用的POST方法,这与HTTP一起



TRANSFER

3.现在ftp_put(可选使用)将上传Web服务器中FTP服务器的文件详细信息



服务器

4.服务器存储缓冲区中的文件,您可以使用
.. After a long search and surf i conclude

CLIENT SIDE
1. The File is uploaded using html form with enctype="multipart/form-data" (for a file upload it is a MUST)

2. The information is sent as binary information encrypted by the "enctype" (MIME Type included) via the POST method which you use in the code, this goes along with the HTTP

TRANSFER
3. Now the ftp_put (optional to use) will upload the file details in the FTP Server in your Web-Server

SERVER
4. Server stores the file in buffer, and you may use


_FILES方法进行di文件的传达信息



5.文件可以通过move_uploaded_file()传输到永久位置,也可以从临时位置进行操作。



...



详情
_FILES method for different information of the file

5. The file may be transferred to a permanent location with move_uploaded_file() or you may operate from the temporary location.

...

The details on


这篇关于PHP-Webserver:Web服务器上传的文件处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆