Use of undefined constant WP_ADMIN - assumed ‘WP_ADMIN‘
如果 WordPress 网站运行的 PHP 版本 从 7.0 升级到 7.4,提示如下警告:
Warning: Use of undefined constant WP_ADMIN - assumed 'WP_ADMIN' (this will throw an Error in a future version of PHP) in D:\xxx\wp-config.php on line 87
解决方法:按照提示,找到代码所在行,按提示修改代码即可。
if (WP_ADMIN === true) {define ('WPLANG', 'zh_CN');
} else {define ('WPLANG', 'zh_CN');
}
修改为:
if ('WP_ADMIN' === true) {define ('WPLANG', 'zh_CN');
} else {define ('WPLANG', 'zh_CN');
}
原因是:高版本的 PHP 把所有的没有加单引号的值都看成了常量,所以只需要在报错的提示的地方把对应的值加上单引号即可解决问题。
Use of undefined constant WP_ADMIN - assumed ‘WP_ADMIN‘相关推荐
- dedecms后台报错“Notice: Use of undefined constant MYSQL_ASSOC - assumed ‘MYSQL_ASSOC‘ ”的解决方法
dedecms后台报错"Notice: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' "的解决方法 p ...
- use of undefined constant php assumed php,php程序语言中出现:Use of undefined constant H - assumed 'H'...
php程序语言中出现:Use of undefined constant H - assumed 'H' 來源:互聯網 2009-05-17 10:05:23 評論 分類: 電腦/網絡 >& ...
- 解决laravel Use of undefined constant JSON_INVALID_UTF8_SUBSTITUTE - assumed ‘JSON_INVAL
安装 Laravel6.0报错 Use of undefined constant JSON_INVALID_UTF8_SUBSTITUTE - assumed 'JSON_INVAL php 版本问 ...
- php提示 Notice: Use of undefined constant name - assumed
http://www.php230.com/1410834481.html 我们知道php在数组中写变量有二几种方法,我们出现这种提示就是你写成了[name]这种所以会有Notice: Use of ...
- Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed ‘MCRYPT_RIJNDAEL_128‘ in
错误: Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /http/w ...
- 修复Warning: Use of undefined constant PRC – assumed ‘PRC
图片描述 原因 php7.2将不加单引号的视为常量 解决 前后加单引号' 修改后具体代码 转载请注明:大魔王ISDevil's Blog » 修复Warning: Use of undefined c ...
- WordPress php升级到7.2提示Warning: Use of undefined constant Y – assumed ‘Y’ 问题解决
今天将php从7.1升到了7.2,升级后浏览文章页面,文章页面底部却出现了以下提示信息: Warning: Use of undefined constant Y – assumed 'Y' (thi ...
- php:Notice: Use of undefined constant id - assumed 'xxxx' 解决办法
Notice: Use of undefined constant id - assumed 'xxxx' 解决办法 比如:Notice: Use of undefined constant id - ...
- OSS PHP SDK报“Use of undefined constant CURLOPT_CLOSEPOLICY - assumed”错误
问题描述 使用OSS PHP SDK时,报错如下错误. Use of undefined constant CURLOPT_CLOSEPOLICY - assumed 'CURLOPT_CLOSEPO ...
最新文章
- Gradle在大型Java项目上的应用
- 2021年程序员1月薪资大幅度上涨,你的2021有奔头了吗?
- datasnap ajax jsonp,有没有办法在Delphi DataSnap REST服务器上使用JSONP?
- ASP.NET备份恢复SqlServer数据库
- SDL2.0文档翻译
- linux重定向权限不够,linux – 如何使用sudo将输出重定向到一个我没有权限写入的位置?...
- iphone静音键失灵_静音键——大部分安卓手机都不爱用的神设计
- Java的历史及发展
- 地图比例尺、瓦片切片方案、EPSG
- 我是如何出版一本书的?
- 虚拟摄像头(拉rtsp流或桌面作为图像源)
- Heat模板及简单应用
- HDU 1997 汉诺塔VII
- WinForm控件Chart的图表类型
- Fedora 9.0 官方下载
- 2、Go自动化测试入门-testify
- flume学习(十一):如何使用Spooling Directory Source
- UnityShader解决小地图或UGUI无法显示特效黑色Shader问题
- Python自动化测试笔记
- matlab矩阵指定行最大值,求Matlab程序:在2行矩阵中,如何求第1行最大值和第2行相应的最大,请问,如何在MATLAB中编写程序实现求两矩阵A*B,A.*...