php-joomla:奇怪的语法错误只发生在localhost中
在服务器(PHP5.6.38)上,我在Joomla有一个工作正常的网站,我试图将其移动到localhost(Uniserverz XIII-PHP5.6.30)来测试一些更新,但当我设置php-joomla:奇怪的语法错误只发生在localhost中,php,joomla,Php,Joomla,在服务器(PHP5.6.38)上,我在Joomla有一个工作正常的网站,我试图将其移动到localhost(Uniserverz XIII-PHP5.6.30)来测试一些更新,但当我设置$error\u reporting='development'时,我遇到了一个错误: 分析错误:语法错误,第64行的C:\UniServerZ\www\site\u name\templates\site\u temp\html\modules.php中出现意外“}” 代码如下: function modChr
$error\u reporting='development'
时,我遇到了一个错误:
分析错误:语法错误,第64行的C:\UniServerZ\www\site\u name\templates\site\u temp\html\modules.php中出现意外“}”
代码如下:
function modChrome_myCatMod($module, &$params, &$attribs)
{
$moduleTag = $params->get('module_tag', 'div');
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'));
$bootstrapSize = (int) $params->get('bootstrap_size', 0);
$moduleClass = $bootstrapSize != 0 ? ' span' . $bootstrapSize : '';
// Temporarily store header class in variable
$headerClass = $params->get('header_class');
$headerClass = ($headerClass) ? ' class="' . htmlspecialchars($headerClass) . '"' : '';
if (!empty ($module->content)) : ?>
<<?php echo $moduleTag; ?> class="moduletable<?php echo htmlspecialchars($params->get('moduleclass_sfx')) . $moduleClass; ?>" id="Mod<?php echo $module->id;?>">
<?php if ((bool) $module->showtitle) : ?>
<?php $com_content_categories = $params->get('com_content_categories'); if(!empty($com_content_categories)):
$caturl = ContentHelperRoute::getCategoryRoute ( $com_content_categories[0] );
?>
<<?php echo $headerTag . $headerClass . '>' ?><a href="<?php echo $caturl;?>"><?php echo $module->title; ?></a></<?php echo $headerTag; ?>>
<?php else : ?>
<<?php echo $headerTag . $headerClass . '>' . $module->title; ?></<?php echo $headerTag; ?>>
<? endif;?>
<?php endif; ?><?php echo $module->content; ?>
</<?php echo $moduleTag; ?>>
<?php endif;
} //////////////////////////////////error line
函数modChrome\u myCatMod($module,&$params,&$attribs)
{
$moduleTag=$params->get('module_tag','div');
$headerTag=htmlspecialchars($params->get('header_tag','h3');
$bootstrapSize=(int)$params->get('bootstrap_size',0);
$moduleClass=$bootstrapSize!=0?'span'.$bootstrapSize:'';
//在变量中临时存储头类
$headerClass=$params->get('header_class');
$headerClass=($headerClass)?'class=“”.htmlspecialchars($headerClass)。“:”;
如果(!empty($module->content)):?>
设置short\u open\u tag=On
在php.ini中
然后重新启动Apache服务器