简体   繁体   English

Wordpress API JSON无法处理大量帖子

[英]Wordpress api json not working with a large amount of posts

I am using JSON API plugin with my wordpress page, the array size of the get_recent_posts json is about 250 posts. 我在我的wordpress页面上使用了JSON API插件,get_recent_posts json的数组大小约为250个帖子。 For instances when i call 例如当我打电话
http://www.example.org/api/get_recent_posts/ to view theses posts in browser I get a blank page with no errors in the console. http://www.example.org/api/get_recent_posts/在浏览器中查看这些文章我得到一个空白页,控制台中没有错误。 However if I limit the such as with http://www.example.org/api/get_recent_posts/?count=50 it works fine. 但是,如果我使用http://www.example.org/api/get_recent_posts/?count=50来限制诸如此类,则效果很好。

My question is , is this normal ? 我的问题是,这正常吗? and how can I get around this , because I want to use an app to display these posts but I can only display a set amount without using custom code to get around this issue. 以及如何解决这个问题,因为我想使用一个应用程序来显示这些帖子,但是我只能显示一个固定的数量,而无需使用自定义代码来解决此问题。

Thanks 谢谢

As Lucas mentioned in the comments, this is not a Wordpress issue but rather an issue that can be addressed with tweaking your server (more accurately, your PHP) configuration. 正如Lucas在评论中提到的那样,这不是Wordpress问题,而是可以通过调整服务器(更准确地说是PHP)配置来解决的问题。 Try adding the following in your .htaccess file (if your on Apache) and ed to allow you to processes the sizes you need. 尝试将以下内容添加到您的.htaccess文件中(如果在Apache上),然后编辑以允许您处理所需的大小。

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value memory_limit 64M

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM