PHPCMS遭遇会员投稿审核无效的解决方法 原创

yipeiwu_com6年前PHP代码库

今天接到主编那边的反馈,说本站的会员投稿平台,后台无法审核文章了,赶紧看看吧

本来想偷个懒,去度娘那里搜搜,看有相同情况的解决方案没,结果大失所望,虽然也有几个类似的情况,要么没解决,要么就是原因跟本站不同。

得了,毛主席他老人家教导我们,自己动手,丰衣足食!

先找到审核的相关程序页

 /phpcms/modules/content/content.php中的pass()方法,检查了下,并无被修改的现象

去审核页面按F12调试,控制台也无报错情况

真是奇了怪了,

查看下源码,发现了这段

<script type="text/javascript">art.dialog({lock:false,title:'管理操作',mouse:true, id:'content_m', content:'<span id=cloading ><a href=\'javascript:ajax_manage(1)\'>通过审核</a> | <a href=\'javascript:ajax_manage(2)\'>退稿</a> | <a href=\'javascript:ajax_manage(3)\'>删除</a></span>',left:'100%',top:'100%',width:200,height:50,drag:true, fixed:true});
		function ajax_manage(type) {
			if(type==1) {
				$.get('?m=content&c=content&a=pass&ajax_preview=1&catid=6&steps=1&id=533&pc_hash=4KwIwD');
			} else if(type==2) {
				$.get('?m=content&c=content&a=pass&ajax_preview=1&reject=1&catid=6&steps=1&id=533&pc_hash=4KwIwD');
			} else if(type==3) {
				$.get('?m=content&c=content&a=delete&ajax_preview=1&dosubmit=1&catid=6&steps=1&id=533&pc_hash=4KwIwD');
			}
			$('#cloading').html('<font color=red>操作成功!<span id="secondid">2</span>秒后自动离开...</font>');
			setInterval('set_time()', 1000);
			setInterval('window.close()', 2000);
		}
		function set_time() {
			$('#secondid').html(1);
		}
		</script>

怪不得不报错。。。

好了,我们把审核链接单独拿出来 http://yourdomain.com/index.php?m=content&c=content&a=pass&ajax_preview=1&catid=6&steps=1&id=533&pc_hash=4KwIwD

放到浏览器地址栏执行一下

果然,有了错误提示了

MySQL Error : Table '.\***\v9_search' is marked as crashed and should be repaired 
MySQL Errno : 145 
Message : Table '.\***\v9_search' is marked as crashed and should be repaired 

原来是search表需要修复下。。。那就修修吧,修完之后,果然审核功能正常了

相关文章

WordPress中用于获取文章信息以及分类链接的函数用法

get_post()(获取一篇文章) get_post() 函数可以根据 ID 查询一篇文章的信息,还能返回循环中的当前文章。 用法 get_post( $post, $output...

PHP中使用file_get_contents抓取网页中文乱码问题解决方法

本文实例讲述了PHP中使用file_get_contents抓取网页中文乱码问题解决方法。分享给大家供大家参考。具体方法如下: file_get_contents函数本来就是一个非常优秀...

解析CI的AJAX分页 另类实现方法

看了一下CI的分页类没有写到关于AJAX的内容,也在论坛上看到其他几位大神写的分页类扩展,感觉其实是没有必要。在现有的基础上做了一下小小的改动还是能实现的。下面进入正题:CI的原生分页类...

PHP实现仿Google分页效果的分页函数

本文实例讲述了PHP实现仿Google分页效果的分页函数。分享给大家供大家参考。具体如下: /** * 分页函数 * @param int $total 总页数 * @par...

php5对象复制、clone、浅复制与深复制实例详解

本文实例讲述了php5对象复制、clone、浅复制与深复制。分享给大家供大家参考,具体如下: 对象复制的由来 为什么对象会有“复制”这个概念,这与PHP5中对象的传值方式是密切相关的,让...