Home >Backend Development >PHP Tutorial >Why do files need to be uploaded to read the file information? Isn't it possible without uploading?

Why do files need to be uploaded to read the file information? Isn't it possible without uploading?

WBOY
WBOYOriginal
2016-10-18 08:56:031548browse

Why do files need to be uploaded to obtain file information? Is it because of permission issues?
I want to get the content in excel, and the ultimate goal is to write it into the database. Wouldn’t it be great if I could get the file content without uploading it? Of course, this does not mean that it can be read arbitrarily. It definitely requires the user to trigger certain operations.

Reply content:

Why do files need to be uploaded to obtain file information? Is it because of permission issues?
I want to get the content in excel, and the ultimate goal is to write it into the database. Wouldn’t it be great if I could get the file content without uploading it? Of course, this does not mean that it can be read arbitrarily. It definitely requires the user to trigger certain operations.

Now with some plug-ins, js can also process binary files like xls. The reason for uploading may be that developers think server processing is easier or supports more files.

Because many browsers do not have permission to read local files due to security considerations, they only have permission to upload. I uploaded a js section on the website to read your system file. If it can be modified again, is your system broken? If you can read it, you can steal a lot of the user's information, and the upload permission is only for the user to click on the file himself, and the browser does not have the right to upload files at will

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn