0

我想制作一个在数据库中添加新闻的脚本,但每个新闻站点都需要一个图像。但我不知道我必须如何处理图像,我是否必须将它们也添加到数据库中,或者他们是另一种方式吗?最好的方法是什么?

干杯

4

2 回答 2

1

You should store path to the image and use it in code that actually loads the file by the path, specified in the DB.

Also: http://www.kirupa.com/forum/showthread.php?323567-How-to-save-image-in-folder-and-path-to-database - look over here. It is the second link in google, by the way.. you better started by looking this up over there.

Storing Images in DB - Yea or Nay? - searching stack... :)

于 2012-10-31T09:29:07.613 回答
0

There're 2 ways 1- Store Image in Database. 2- Store Image's file path in Database

于 2012-10-31T09:30:19.220 回答