V
V
Vlad Revuk2015-01-03 01:46:09
JavaScript
Vlad Revuk, 2015-01-03 01:46:09

How to pass data from local file to javascript?

The user has a local file. You need to read this file and pass it to javascript. And then write somewhere to read from php (if possible). How to do it and in what language is it better to do it?
(Perhaps this can be written to a cookie, cache or web variable)

Answer the question

In order to leave comments, you need to log in

6 answer(s)
F
Fellzo, 2015-01-03
@Fellzo

The only option is a desktop application on JS'e. You cannot do this in a browser, you can only work with cookies, sessions and storage from it.

D
Dmitry Korolev, 2015-01-03
@Apathetic

No way.

S
Stopy, 2015-01-03
@Stopy

Javascript does not have access to the file system. Try to <input type="file">send it to the server, read it there and return the content through the same php. By the way, you can send files without rebooting (google)

P
profesor08, 2015-01-03
@profesor08

You need an html form to select a file and some php to process the file.
You can also read here: www.html5rocks.com/ru/features/file_access

A
Alexander Litvinenko, 2015-01-03
@edli007

Such functionality can only be implemented through Java applets or the like (namely Java, not JavaScript), in JS itself, the browser completely restricts access to the user's computer (to avoid downloading viruses and other things).

M
Miku Hatsune, 2015-01-03
@Hatsune-Miku

So not how. If JS was capable of such things, it would somehow not be dangerous to live...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question