dqeq885710 2015-10-29 18:28
浏览 28

如何将上传的图片放入网页(Jquery)

I want to show an uploaded image on the web. I'm using a plugin called Dropzone to upload the pictures but I don know how to recover and display them on the page.

This is the php I'm using to upload the images:

<?php
$ds          = DIRECTORY_SEPARATOR;  //1

$storeFolder = 'uploads';  

if (!empty($_FILES)) {

$tempFile = $_FILES['file']['tmp_name'];                      

$targetPath = dirname( __FILE__ ) . $ds. $storeFolder . $ds;  

$targetFile =  $targetPath. $_FILES['file']['name'];  

move_uploaded_file($tempFile,$targetFile); /

}
?>

edit: I want to show the image on the same page, removing the uploading box and replacing it with the image with JQuery/php

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 微信小程序协议怎么写
    • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
    • ¥20 怎么用dlib库的算法识别小麦病虫害
    • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
    • ¥15 java写代码遇到问题,求帮助
    • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
    • ¥15 有了解d3和topogram.js库的吗?有偿请教
    • ¥100 任意维数的K均值聚类
    • ¥15 stamps做sbas-insar,时序沉降图怎么画
    • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看