Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 841 Bytes

README.md

File metadata and controls

28 lines (22 loc) · 841 Bytes

serverless-typecho

通过serverless部署typecho

目前支持vercel,replit部署

Deploy with Vercel

Run on Repl.it

部署后需要修改config.inc.php

/** 定义数据库参数 */
$db = new Typecho_Db('Pdo_Mysql', 'typecho_');
$db->addServer(array (
  'host' => '服务器地址',
  'user' => '用户名',
  'password' => '密码',
  'charset' => 'utf8mb4',
  'port' => '3306',
  'database' => '数据库名称',
  'engine' => 'MySQL',//数据库类型
), Typecho_Db::READ | Typecho_Db::WRITE);
Typecho_Db::set($db);