源码介绍
选择Github白嫖Github的存储空间,通过jsdelivr全球加速(含有国内节点)。实现图床的目的。
选择Gitee白嫖Gitee的存储空间, 实现图床的目的。存储和访问节点都在国内,请在遵循国内相关法律的前提下使用。 文件在1M以上需要访客登录才能访问。1M以下,相当稳。
1、配置上传类型 – 选择github
https://github.com/settings/tokens 去这个页面生成一个有写权限的token(repo:Full control of private repositories 和write:packages前打勾)然后配置up.php中的相关字段。
define(“TYPE”,”GITHUB”);//选择github
define(“USER”,”pic-cdn”);//你的GitHub/Gitee的用户名
define(“REPO”,”cdn2″);//必须是上面用户名下的 公开仓库
define(“MAIL”,”yumusb@foxmail.com”);//邮箱无所谓,随便写
define(“TOKEN”,”YourToken”);
配置上传类型 – 选择Gitee
去往这个页面 https://gitee.com/personal_access_tokens 生成你的token,然后建立空白仓库且初始化master分支。可以看这里 https://gitee.com/help/articles/4122
然后配置up.php的字段。
define(“TYPE”,”GITEE”);//选择gitee
define(“USER”,”pic-cdn”);//你的GitHub/Gitee的用户名
define(“REPO”,”cdn2″);//必须是上面用户名下的 公开仓库
define(“MAIL”,”yumusb@foxmail.com”);//邮箱无所谓,随便写
define(“TOKEN”,”YourToken”);
就可以享受白嫖带来的乐趣了!
2、配置数据库
请确保把源码目录下的 pic.sql 导入到你的数据库,然后更改相关配置项。
$database = array(
'dbname' => 'YourDbName',//你的数据库名字
'host' => 'localhost',
'port' => 3306,
'user' => 'YourDbUser',//你的数据库用户名
'pass' => 'YourDbPass',//你的数据库用户名对应的密码);
$table = 'remote_imgs'; //表名字
隐藏内容需要登录才可以看见