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: 2 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 (7 months ago)
- Last Synced: 2024-12-16T09:22:30.752Z (9 days ago)
- Topics: blog, free, php, typecho, vercel
- Language: PHP
- Homepage: https://blog.imlete.cn/article/Vercel-Deploy-Typecho.html
- Size: 488 KB
- Stars: 142
- Watchers: 1
- Forks: 179
- 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);
```