文章标签 ‘wordpress’
最近想用wordpress最为一个数据展示系统,需要将数据导入到wordpress系统中,网上找半天,未发现有人对此做过应用及介绍,只好自己来研究了。 通过wordpress.org 了解是wp-app.php 文件提供了atom功能,打开源码,就可以找到其支持的各种方法,POST、GET、DELETE等,如下: $this->selectors = array( ‘@/service$@’ => array(‘GET’ => ‘get_service’), ‘@/categories$@’ => array(‘GET’ => ‘get_categories_xml’), ‘@/post/(\d+)$@’ => array(‘GET’ => ‘get_post’, ‘PUT’ => ‘put_post’, ‘DELETE’ => ‘delete_post’), ‘@/posts/?(\d+)?$@’ => array(‘GET’ => ‘get_posts’, ‘POST’ => ‘create_post’), ‘@/attachments/?(\d+)?$@’ => array(‘GET’ => ‘get_attachment’, ‘POST’ => ‘create_attachment’), ‘@/attachment/file/(\d+)$@’ => array(‘GET’ => ‘get_file’, ‘PUT’ => ‘put_file’, ‘DELETE’ => ‘delete_file’), [...]
今天将wordpress迁移到lighttpd下,居然发现不能正常显示,代码也没动,表现就是 什么字符也不输出,就行代码中间用了die()一样,无解,只要一步一步找原因,最终发现是 WP SUPER CACHE 插件的问题,代码如下: wp-content下的文件advanced-cache.php < ?php # WP SUPER CACHE 0.8.9.1 require_once( '/home/.evva/liangpeng.net/wp-content/plugins/wp-super-cache/' . 'wp-cache-phase1.php' ); ?> 改为 require_once(WP_CONTENT_DIR . ‘/plugins/wp-super-cache/’ . ‘wp-cache-phase1.php’ ); 即可,哎原来是WP SUPER CACHE直接写了个绝对路劲进去,而我用的lighttpd居然在require_once找不到文件的时候,就中断运行了,偶不经常用lighttp,不知道是不是可以配置此问题。一番折腾后,终于搞定。
发表文章的时候不能有下面的一句话( $ fp=fopen (“e:\\tmp\\phpsid.txt”,”w+”); ) [将其中的空格去掉,成为完整的php语句],如果有,则会出现如下错误: Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. 偶的wp版本是2.7
