使用typecho插件出现notice重复定义

WBOY
Release: 2016-06-06 20:37:46
Original
1442 people have browsed it

我用了两个插件,都出现相同的警告。
Notice: Constant __TYPECHO_ADMIN__ already defined in /var/www/html/fayfox.com/whis/a/common.php on line 6
这个问题该怎么解决

回复内容:

我用了两个插件,都出现相同的警告。
Notice: Constant __TYPECHO_ADMIN__ already defined in /var/www/html/fayfox.com/whis/a/common.php on line 6
这个问题该怎么解决

估计是这个文件被重复require了。
你试着修改下代码,if(!defined('TYPECHO_ADMIN')) define('TYPECHO_ADMIN','xxxxxxx');
或者你找一下其他地方,是不是也定义了这个常亮:grep -nri 'TYPECHO_ADMIN ' /var/www/html/fayfox.com/*
http://www.typechodev.com/index.php/archives/60/

vim /var/www/html/fayfox.com/whis/a/common.php

把第六行

<code>define('__TYPECHO_ADMIN__', true);</code>
Copy after login

改成:

<code>if (!defined('__TYPECHO_ADMIN__')) {
        define('__TYPECHO_ADMIN__', true);
}</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template