我很茫然,我花了几个星期阅读网站后,试图了解我能做些什么。问题在于,自从我有一个网站以来,我一直在学习,这主要是困难的。 ;)语法错误,意外的'}'
如果你能帮助我,我将不胜感激。
此错误(在此情况下53)相关的可湿性粉剂内容/插件/色的小部件/ colorwidgets.php
上方行是:
}
<?php }
} ?>
<div style="background-color:<?php echo $textbgcolor; ?>; color:<?php echo $textfontcolor; ?>; text-align:<?php echo $texthalign; ?>; padding:<?php echo $textpadding; ?>"><?php echo $text; ?></div>
<?php if ($themestyle == 'Yes') { echo $after_widget; } ?>
</div>
<?php
**本}是在该行在<?php
之下。
底下}是:**
/** @see WP_Widget::update */
function update($new_instance, $old_instance) {
return $new_instance;
}
**我删除了},但语法错误,意外“}”,当我尝试访问我的网站仍然存在,所以我把它放回去。
.............. 然后我将admin添加到URL的末尾,并得到不同的消息。
致命错误:类 'ColorWidgets' 在/wp-includes/widgets.php未发现线324
该生产线是(下图):**
$this->widgets[$widget_class] = & new $widget_class();
这之上是:
/**
* Singleton that registers and instantiates WP_Widget classes.
*
* @package WordPress
* @subpackage Widgets
* @since 2.8
*/
class WP_Widget_Factory {
var $widgets = array();
function WP_Widget_Factory() {
add_action('widgets_init', array(&$this, '_register_widgets'), 100);
}
function register($widget_class) >{
$this->widgets[$widget_class] = & new widget_class();
最后一行是错误行及以下内容是:
}
function unregister($widget_class) >{
if (isset($this->widgets[$widget_class]))
>unset($this->widgets[$widget_class]);
}
.............
我对于跟着我的职务所需的时间量道歉,我会非常感激的反馈。感谢您的聆听。 :)
PHP可以针对此问题的熊。隐藏字符可能导致此问题。特别是如果你复制并粘贴示例代码,说一个PDF文件。我会尝试的第一件事是不使用复制和粘贴来重新创建文件。只需输入所有内容。 – samack
任何机会,你可以向我们展示代码从头到尾,而不是分成几块? –