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.
我有一个 HTML 输入文件类型“按钮”,当我选择一个文件时,我只能获取文件的名称,并且无法获取 PHPExcel 似乎需要的完整路径才能读取提到的文件,我怎么能由于库位于服务器端并且用户必须在客户端选择一个文件,因此使其工作。
有任何想法吗?
由于安全问题,您无法从 HTML 获取文件的完整路径,因为 Web 浏览器无权访问您的本地文件系统。
所以你select和文件到,file并处理它。uploadserver
select
file
upload
server