加载图像预览Codeigniter

时间:2014-04-27 06:10:38

标签: php jquery ajax codeigniter

我正在处理用户上传图像的模块(在Codeigniter中)。他有幸看到图像预览将如何显示。我想通过ajax这样做。

      1. Is is necessary to upload the image (ie save image in our database , get the url where it is stored and Load the image) to load the preview of the image.

      2. Is there any other way through which I can display the preview without storing the image in our database. (Getting the url from the client side  and displaying it.. How to do this ? )

1 个答案:

答案 0 :(得分:0)

上传资产文件夹中的图像,然后在表格中插入图像的路径。如果要预览图像,请将链接指定为图像标记(<img src="path of the image from table" />)。