3 Star 2 Fork 0

Gitee 极速下载 / Tiny Tiny RSS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/torne/Tiny-Tiny-RSS
克隆/下载
update_feedbrowser.php 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
Andrew Dolgov 提交于 2009-01-31 19:02 . make update scripts executable
#!/usr/bin/php
<?php
/* This script updates feedbrowser (e.g. Other Feeds tab) cache
* If you are using update daemon, it is NOT necessary to run
* this script, as updates are handled automatically. */
define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
define('DISABLE_SESSIONS', true);
error_reporting(DEFAULT_ERROR_LEVEL);
require_once "sanity_check.php";
require_once "config.php";
require_once "db.php";
require_once "db-prefs.php";
require_once "functions.php";
$lock_filename = "update_feedbrowser.lock";
$lock_handle = make_lockfile($lock_filename);
// Try to lock a file in order to avoid concurrent update.
if (!$lock_handle) {
die("error: Can't create lockfile ($lock_filename). ".
"Maybe another process is already running.\n");
}
// Create a database connection.
$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
if (!$link) {
if (DB_TYPE == "mysql") {
print mysql_error();
}
// PG seems to display its own errors just fine by default.
return;
}
init_connection($link);
$count = update_feedbrowser_cache($link);
print "Finished, $count feeds processed.\n";
db_close($link);
unlink(LOCK_DIRECTORY . "/$lock_filename");
?>
PHP
1
https://gitee.com/mirrors/tiny-tiny-rss.git
git@gitee.com:mirrors/tiny-tiny-rss.git
mirrors
tiny-tiny-rss
Tiny Tiny RSS
master

搜索帮助