is it possible to read a file using javascript?

后端 未结 6 1355
别那么骄傲
别那么骄傲 2020-12-07 04:25

Hi all i just want to know if we can read a file using javascript like

what we do

fp=(\"r\",\"path\")

like that is i

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 04:53

    No, that's not possible in a browser. Javascript runs in a sandboxed environment and doesn't have access to the file system. You might need to special plugins to be installed on the client browser in order to access his file system.

提交回复
热议问题