Javascript - Copy File
So clearly, we can kind of forget about that option.
So, since you say you already know how to do these things in php, your next step might be to add a javascript driven/enhanced (think tree-view etc) html-gui that sends commands (post or get) to your php-script that actually copies/modifies the files on your server. Ultimately you are then just recreating a php-file manager (google hint).
If you'd go the node.js way, than this kind of just replaces php and the rest of the methodology is still the same: back-end executes commands and sends results/directory-lists etc. to HTML GUI (possibly via ajax).
You see, there are plenty of more fun things to explore, you are already half way there.
Hope this helps.
EDIT: One might cheat tough, you could download a file (and modify it) and store it in an HTML5 typed array and using http PUT (also supporting delete) storing it on the server again. Now you'd still need to handle security/user-identification... (and there php, json, some server-side handler still kicks-in once again, I'm currently not sure how apaches put-module works once enabled). Using server side includes that you have modified to display a directory-listing and some of this kind of javascript in the header might make a very crude file-manager.. kind of.. Not exactly copying...
Solution 2:
This is a strange example. First of all, it is not common for an HTML page to interact with the local file system. I would expect that any modern browser would complain ALOT about this code with warning and setttings requirements. In addition, it is using an activeX control which should only be available on IE if anywhere.
Maybe this example is about 15 years old? That would explain a lot.
I wouldn't expect this to work out of the box on any system installed / configured in the last 5 years.
You could change the settings on your system to let it work, but I would not recommend that. You system would be powned / zombied within minutes.
I think we need to go back to what you are trying to do and why, I suspect that javascript in HTML is not the answer.
Based on the comment my suggestion is you work with node.js. You will learn a lot, have fun, and be working with a technology that is not 15 years out of date.
Go here, have fun:
Solution 3:
rename your file extension to .hta and double click it.. voila..
Post a Comment for "Javascript - Copy File"