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: 16 days 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-07-31T08:16:25.271Z (4 months ago)
- Topics: blog, free, php, typecho, vercel
- Language: PHP
- Homepage: https://blog.imlete.cn/article/Vercel-Deploy-Typecho.html
- Size: 488 KB
- Stars: 136
- Watchers: 1
- Forks: 169
- 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);
```