有没有办法在不使用PHP的情况下本地处理文件?

huangapple go评论69阅读模式
英文:

Is There a Way To Handle Files Locally Without Using php

问题

I'm designing a web app (HTML/CSS/JS) that will run natively on my computer which I want to use to handle local files on my computer (like images and stuff like that.) I understand the use of php scripts and other browser security for a website running online, but is there an easier way to handle it if I'm running the application from my computer?

All I want to be able to do is browse my computer for files, "upload" those files to the web app (copy them into the relative path of the application), mess around and do various things with them, and then save them to a customizable path back onto my computer.

If there is not an easier way to do this, I would also accept suggestions about where to start with file management, I'm new to that area of web design.

Thanks!

英文:

I'm designing a web app (HTML/CSS/JS) that will run natively on my computer which I want to use to handle local files on my computer (like images and stuff like that.) I understand the use of php scripts and other browser security for a website running online, but is there an easier way to handle it if I'm running the application from my computer?

All I want to be able to do is browse my computer for files, "upload" those files to the web app (copy them into the relative path of the application), mess around and do various things with them, and then save them to a customizable path back onto my computer.

If there is not an easier way to do this, I would also accept suggestions about where to start with file management, I'm new to that area of web design.

Thanks!

答案1

得分: 1

你可以使用带有文件类型的 input 元素,然后你可以使用 File API 操作文件。

如果你需要获取文件的路径,你可以使用 Electron 与 Node 的 文件系统 API 结合使用。

英文:

You can use an input element with a type of file then you can manipulate the file using the File API.

If you need to have the paths of the files, you can use Electron in conjunction with Node's filesystem API.

huangapple
  • 本文由 发表于 2023年3月21日 03:20:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/75794447.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定