doulun1666 2018-07-13 19:39
浏览 180

用户如何将图像上传到Apache Web服务器?

I'm a new web designer that's creating a website that, among other things, allow an admin to fill out a form which fills in the blanks for a web page template that I've created which will then display on our website. I've figured out everything except for how the image upload will work. im currently using a localhost running WAMP (Apache, mysql, php). W3 tutorials had me using $_FILE["myimage"]["name"] to store myimage.jpg in the directory I specified on my server but this doesnt make sense to me. if I'm understanding this correctly then this code is only storing text information and not an image itself which isnt helpful. my understanding is that HTTP requests are text only which means I would need to use FTP to transfer an image but from my research it looks like Apache servers dont support FTP.

so here are my questions: 1. is FTP the best/only way to go about handling image uploads to my server? 2. should I stick with an Apache web server or are there other kinds of servers that would better suit my needs? 3. am I making things harder on myself by doing all of this on a localhost? I'm already planning on migrating to a dreamhost server should I do that sooner rather than later?

  • 写回答

1条回答 默认 最新

  • dpy33121 2018-07-13 20:32
    关注

    http can send binary data using post method! It is not limited to text data. You dont need to use FTP, Unless your server does not support http uploads.

    评论

报告相同问题?

悬赏问题

  • ¥20 matlab计算中误差
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊