简体   繁体   中英

How to send data from a browser to a server?

I want to send a file to the server, can I do that using only PHP? Or should I use javascript?

And is there a library to help me? I don't want (and also don't know how) to convert files into char* and send using sockets.

Sorry, inattentively read. If <input type="file" /> does not fit, try to use html5 FileReader object. https://developer.mozilla.org/en-US/docs/Web/API/FileReader

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM