We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,414 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Read File

Hey, I'd like to read a file from the server, by any means necessary. As long as I can use something like JavaScript, like it has to be client sided. No server sided scripting language. If there is no way to read a file from the server, is there a way to read from client's computer?

Thanks, Glut.

2
Contributors
2
Replies
1 Day
Discussion Span
1 Year Ago
Last Updated
3
Views
glut
Light Poster
42 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

You can always read a file from a web server; serving files is its nature. But you'll need an URL to tell it which file. Look into XMLHttpRequest().

Accessing the local filesystem from JS generally doesn't work; most browsers flat-out prohibit it even if you load the JS program from the local disk. All browsers *should* prohibit accessing anything from outside the 'domain' of the loaded web site.

Fest3er
Posting Whiz in Training
243 posts since Aug 2007
Reputation Points: 51
Solved Threads: 35
Skill Endorsements: 0

Solved. Thank you, what you said worked.

glut
Light Poster
42 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.1745 seconds using 2.66MB