小编Bil*_*kin的帖子

脚本标头过早结束:index.php,mod_fcgid:在61秒内读取数据超时

我在localhost写了一个简单的爬行脚本(在php中)(有4个版本).所有这些都在localhost上运行良好.但当我将它们移动到共享主机时,其中两个工作其他人给出了内部服务器错误.我查看了error_log,我看到了这些行:

[Wed Jan 23 22:01:02 2013] [warn] [client ***] mod_fcgid: read data timeout in 61 seconds
[Wed Jan 23 22:01:02 2013] [error] [client ***] Premature end of script headers: index.php
Run Code Online (Sandbox Code Playgroud)

我搜索过但找不到任何有用的结果.这些错误有什么关系?有任何想法吗?

php apache timeout mod-fcgid

18
推荐指数
1
解决办法
4万
查看次数

Laravel Eloquent查询生成器默认条件

我有新闻模型,当我查询新闻时,我希望它带来状态= 1的新闻作为默认值.

News::all(); // select * from news where status = 1
News::where('anotherColumn',2)->get(); // select * from news where status = 1 and where category = 2
Run Code Online (Sandbox Code Playgroud)

这可能吗?我想要的是如此类似于软删除功能(它得到的地方,deleted_at不为null,如果所有数据都需要withTrashed函数可以使用).

我看了文档,但我找不到任何有用的东西.此外,我试图在新闻模型的构造中处理它,但它也没有工作.

谢谢.

php laravel eloquent laravel-4

10
推荐指数
3
解决办法
9315
查看次数

标签 统计

php ×2

apache ×1

eloquent ×1

laravel ×1

laravel-4 ×1

mod-fcgid ×1

timeout ×1