帝国cms汇率源码安装说明
2024-12-12
使用环境:PHP 7.0 (PHP 5.6会报错)mysql开发的时候使用的是5.7
域名需要安装SSL证书,否则会获取不到汇率
----------------------------------------------------------------
把源码导入根目录,解压
修改数据库链接
e/config/config.php
后台/e/andy/
账号 yc888
密码 qwe123
---------------------
伪静态(nginx)需要apache的自行转换!!!!
location = /paijia/ {
return 301 /paijia/index.html;
}
location ~ ^/paijia/(?!index\.html$)([^/]+)\.html$ {
rewrite ^/paijia/([^/]+)\.html$ /e/action/paijia.php?classid=2¤cy=$1 last;
}
location = /bank/ {
return 301 /bank/index.html;
}
location ~ ^/bank/(?!index\.html$)([^/]+)\.html$ {
rewrite ^/bank/([^/]+)\.html$ /e/action/bank.php?classid=3&yhsx=$1 last;
}
rewrite ^/huilv/([^/]+)_([^/]+)/?$ /e/action/huilv.php?classid=1¤cy=$1&to=$2&sum=1 last;
rewrite ^/huilv/([^/]+)_([^/]+)/([^/]+)\.html$ /e/action/huilv.php?classid=1¤cy=$1&to=$2&sum=$3 last;
location = /daxie/ {
return 301 /daxie/index.html;
}
location ~ ^/daxie/(?!index\.html$)([^/]+)\.html$ {
rewrite ^/daxie/([^/]+)\.html$ /e/action/daxie.php?classid=1¤cy=CNY&sum=$1 last;
}
rewrite ^/news/([^/]+)\.html$ /e/action/news.php?classid=4&id=$1 last;
rewrite ^([^\.]*)/tag/([a-z0-9]+)_([0-9]+).html$ $1/e/tags/itag.php?py=$2&page=$3 last;
rewrite ^([^\.]*)/tag/([a-z0-9]+).html$ $1/e/tags/itag.php?py=$2 last;
拓展变量中填写你的授权码汇率的API,
API申请地址https://www.exchangerate-api.com/
API每30天有1400次的免费调用,
更新数据
从右边开始。从上到下点一次
-----------------------------------------------
设置定时清理缓存
修改/bazhepu/huancun.php第二行的密码
宝塔打开计划任务
访问的URL:https://你的域名/bazhepu/huancun.php?password=你设置的密码
宝塔建议设置为8小时,或者12小时都可以。
------------------------
到这里就不用管它了