Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lete114/vercel-typecho
Vercel 免费部署 Typecho 博客 | Vercel Free Deploy Typecho Blog
https://github.com/lete114/vercel-typecho
blog free php typecho vercel
Last synced: about 11 hours ago
JSON representation
Vercel 免费部署 Typecho 博客 | Vercel Free Deploy Typecho Blog
- Host: GitHub
- URL: https://github.com/lete114/vercel-typecho
- Owner: Lete114
- License: gpl-2.0
- Created: 2021-05-03T09:39:04.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T02:09:09.000Z (5 months ago)
- Last Synced: 2024-11-06T04:02:38.883Z (7 days ago)
- Topics: blog, free, php, typecho, vercel
- Language: PHP
- Homepage: https://blog.imlete.cn/article/Vercel-Deploy-Typecho.html
- Size: 488 KB
- Stars: 139
- Watchers: 1
- Forks: 177
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Vercel-Typecho
![visitor_badge](https://visitor-badge.imlete.cn/?id=github.Lete114.Vercel-Typecho)
Vercel 免费部署 Typecho 博客 | Vercel Free Deploy Typecho Blog
> **Warning**: 建议 fork 仓库后改为私有仓库,以免泄露自己的数据库**用户名**和**密码**,或者使用读取环境变量的方式读取数据库信息
```php
/** 定义数据库参数 */
$db = new Typecho_Db($_ENV["ADAPTER_NAME"], $_ENV["PREFIX"]);
$db->addServer(array (
'host' => $_ENV["HOST"],
'user' => $_ENV["USERNAME"],
'password' => $_ENV["PASSWORD"],
'charset' => $_ENV["CHARSET"],
'port' => $_ENV["PORT"],
'database' => $_ENV["DATABASE"],
'engine' => $_ENV["ENGINE"],
), Typecho_Db::READ | Typecho_Db::WRITE);
Typecho_Db::set($db);
```