简体   繁体   English

如何使用php将图像文件从数据库输入[file]

[英]How to put an image file to input[file] from database using php

我应该如何将图像放入<input type="file">其中图像来自我的数据库(实际上,图像名称只写入数据库,图像存储在我的文件夹中),就像一个value="" in另一种输入类型,但<input type="file" value="<?php echo $imagefileerwerewr; ?>">不能保留图像文件。

There is not a way that you can just put you image inside an file input and you can update image.没有一种方法可以将图像放入file输入中,然后更新图像。 I would suggest you that you use both img tag and input tag to archieve this.我建议你同时使用img标签和input标签来存档。 You can use img tag to show the current image and also you can use input to let the users to update another image if they want.您可以使用img标签来显示当前图像,也可以使用input让用户根据需要更新另一个图像。

I would suggest you to use dropzone it has some great features and would be easier for you to manage all this我建议您使用dropzone它具有一些很棒的功能,并且您可以更轻松地管理所有这些

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用php将图像或文件存储在文件夹中以及数据库中的该路径,但是图像或文件不是来自html的发布功能 - how to store image or file in a folder and that path in Database using php but image or file is not coming from post functionality of html 使用php:// input和file_put_contents - Using php://input and file_put_contents 使用php从mysql数据库中读取图像文件 - Reading an Image file from a mysql database using php 如何使用PHP根据用户输入配置CodeIgniter数据库文件? - How to configure CodeIgniter database file based on user input using PHP? 如何从 PHP 中的数据库填充输入类型文件值? - How to populate input type file value from database in PHP? 如何使用PHP和MySQL从文件输入字段保存图像? - How can I save an image from a file input field using PHP & MySQL? <input type=“file” accept=“image/*;capture=camera”>使用PHP将图像保存到数据库 - <input type=“file” accept=“image/*;capture=camera”> save image to database using php 如何使用jquery,ajax和php在数据库中保存图像文件(BLOB) - How to save an image file (BLOB) in the database using jquery, ajax and php 如何从mysql数据库检索图像文件路径并使用php显示图像 - How to retrieve image file paths from mysql database and display the images using php PHP从文件输入中复制图像 - PHP copy image from file input
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM