dongtaotao19830418 2014-02-08 15:43
浏览 283

如何使用Jasny图像上传并在PHP中发布图像

there's a similar question about this but honestly i still don't understand how it works.

here is the code:

<div class="fileupload fileupload-new" data-provides="fileupload">
    <div class="fileupload-preview thumbnail" style="width: 200px; height: 150px;">
    </div>
    <div>
        <span class="btn btn-default btn-file"><span class="fileupload-new">Select image</span>
        <span class="fileupload-exists">Change</span><input type="file" name="myimage" accept="image/*"></span>
       <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
    </div>
</div>

my questions is: 1.) how will i pass the image using $_POST[] or $_FILES[] ?

2.) does the <input type="file" name="myimage" accept="image/*"> handles both when the user clicks the "Select Image" and "Change"?

3.) or what way can i pass the image and upload it on the server using PHP?

  • 写回答

2条回答 默认 最新

  • dtdfl62844 2014-09-01 05:07
    关注

    use tag with enctype as multipart/form-data around this code to post your files.

    评论

报告相同问题?

悬赏问题

  • ¥15 matlab中使用gurobi时报错
  • ¥15 WPF 大屏看板表格背景图片设置
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂