用于压缩长网址,并随机生成5~7位英文字母+数字作为短址.
安装说明
# 1. 使用 composer 安装程序依赖
$ composer install
# 2. 安装数据库结构
$ php ./Package/bin/phinx migrate
Nginx Rewrite
root /home/shortUrl/Public;
# 路由
if (!-e $request_filename) {
    rewrite (.*) /index.php last;
}
😄  Hashids 算法
Hashids是根据记录的id与 设置的HASHIDS_SALT生成唯一token 的一种算法.- 它能够保证生成的
token相对HASHIDS_SALT永不重复, 并且支持反向解密。 
如果你使用 
Hashids , 请务必去设置一个唯一的 HASHIDS_SALT , 并做好备份。
FROM https://github.com/sendya/shortUrl
-------
https://github.com/zu1k/shorturl 
No comments:
Post a Comment