Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

推荐在cli模式运行 #1

Closed
sy-records opened this issue Apr 26, 2019 · 7 comments
Closed

推荐在cli模式运行 #1

sy-records opened this issue Apr 26, 2019 · 7 comments

Comments

@sy-records
Copy link

😬fpm是阻塞的,时间长肯定超时导致失败,运行这种代码还是cli模式运行比较好

@ihewro
Copy link
Owner

ihewro commented Apr 26, 2019

直接命令行调用php,拿不到typecho的数据库对象db,所以没办法操作博客数据库

我也没查到的好的办法🤒

@sy-records
Copy link
Author

$db = Typecho_Db::get(); //获取数据库对象

静态调用不应该拿不到吧😂
不用typecho,具体的不太清楚

@Wigiesen
Copy link

依赖Typecho_Db,如果命令行模式肯定找不到Typecho_Db的调用

@ihewro ihewro closed this as completed Apr 26, 2019
@ihewro
Copy link
Owner

ihewro commented Apr 26, 2019

暂时可以修改$GLOBALS['limit'] 为一个较小值保证不会超时,然后多次调用🤒

@ihewro ihewro pinned this issue Apr 26, 2019
@Wigiesen
Copy link

神奇思路,可以有

@sy-records
Copy link
Author

依赖Typecho_Db,如果命令行模式肯定找不到Typecho_Db的调用

@Wigiesen @ihewro 用不了吗?引入config.inc.php就可以啊?所以避免超时还是用cli模式运行最好。

image

@Wigiesen
Copy link

@sy-records 很强势……

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants