Typecho 重置管理员密码
<?php
include_once 'config.inc.php';

Typecho_Widget::widget('Widget_Init');

$password = 'new password';
$password_hashed = (new PasswordHash(8, true))->HashPassword($password))

$db = Typecho_Db::get();
$db->query(
  $db->update('table.users')
    ->rows(array('password' => $password_hashed)
    ->where('uid = ?', 1)
);

header('Content-Type: text/plain');

echo 'typecho reset password done';