如何在mysql数据库中添加torrent文件 [英] How to add torrent files in mysql database

查看:111
本文介绍了如何在mysql数据库中添加torrent文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我被分配了一个学期项目来构建一个torrent网站。我不知道如何在mysql数据库中添加.torrent文件?请尽快回复

解决方案

< blockquote>正如评论中所讨论的,我建议寻找两种主要不同方法的例子。



1.将文件以二进制格式存储在数据库中直。这样可以保存带有数据库的映像,但是当你将数据库拉出数据库时,你需要代码来处理它。

2.将文件存储在某个地方的服务器上然后只在数据库中写出来文件的路径。



无论哪种方式都有利有弊,所以在你找到几个例子之后再找一个对你感觉更好的例子。


I have been assigned a semester project to build a torrent site.I am unaware that how do i add the .torrent file in mysql database?Please reply ASAP

解决方案

As discussed in the comments, I suggest looking for examples of the two main different ways of doing this.

1. Store the file in binary format in the database directly. This keeps the image with the db but you'll need code to process it when you pull it out of the db.
2. Store the file on the server somewhere and then in the database only write out the path to the file.

Either way has pros and cons so after you find a couple of examples go with one that feels better for you.


这篇关于如何在mysql数据库中添加torrent文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆