您没有足够的权限访问此页面 [英] You do not have sufficient permissions to access this page
问题描述
我正在WordPress中创建一个简单的插件.这是一个简单的表单,具有三个字段,这些字段会将数据保存到数据库表中.该插件已成功激活,但是当我填写表格并按下按钮提交时,它向我显示了一个空白屏幕,并显示以下错误:
I am creating a simple plugin in WordPress. This is a simple form with three fields that will save data to a database table. The plugin is activated successfully, but when I fill the form and press button to submit, it shows me a blank screen with error:
You do not have sufficient permissions to access this page.
我搜索了Internet,但没有找到解决方案.
I searched the Internet but did not find a solution.
推荐答案
我修复了此错误.登录到您的phpadmin并访问该数据库.选择"usermeta"表.检查元键"_capabilities". 这是在您的wp_config中定义的.表前缀是CASE SENSITIVE.检查其值.
I fixed this error. login to your phpadmin and access that DB. select "usermeta" table . Check meta key "_capabilities". this is defined in your wp_config. table prefix is CASE SENSITIVE. Check its value.
_capabilities的值为a:1:{s:13:"administrator"; b:1;}
_capabilities will have its value a:1:{s:13:"administrator";b:1;}
表前缀"wp_"与"Wp_"不同. 因此,请修改usermeta表中的记录并检查您的网站.
table prefix "wp_" is not same as "Wp_". so edit the record in usermeta table and check your site.
tableprefix在与WP前端进行数据库连接中起着至关重要的作用
tableprefix play a vital role in DB connection with WP frontend
这篇关于您没有足够的权限访问此页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!