PHP Parse error: syntax error, unexpected end of file in PHP 5.5.9
PHP Parse error: syntax error, unexpected end of file in PHP 5.5.9
我有以下代码:
<?php if ($template['issue']['raw_state'] == 0 && ($helper->user_coordinator($template['issue']['id']) || isset($nparams['tid']))): ?>
<a href="?id=<?php echo $this->id('cause_form', 'id', $template['issue']['id']) ?>">
<?php echo $bezlang['add_cause'] ?>
</a>
<? endif ?>
它在我的大多数服务器上运行良好,但在其中一个服务器上我收到错误:
PHP Parse error: syntax error, unexpected end of file in
/var/www/dokuwiki/lib/plugins/bez/tpl/issue_causes.php on line 19,
这段代码有什么问题?
整个文件issue_cause.php:
<?php include "issue_box.php" ?>
<div class="bds_block" id="bez_causes">
<h1><?php echo $bezlang['causes'] ?> <span>(<?php echo count($template['causes']) ?>)</span></h1>
<div class="bds_block_content">
<?php foreach ($template['causes'] as $cause): ?>
<?php include "cause.php" ?>
<?php endforeach ?>
</div>
<?php if ($template['issue']['raw_state'] == 0 && ($helper->user_coordinator($template['issue']['id']) || isset($nparams['tid']))): ?>
<a href="?id=<?php echo $this->id('cause_form', 'id', $template['issue']['id']) ?>">
<?php echo $bezlang['add_cause'] ?>
</a>
<? endif ?>
</div>
<?php include "removal_confirm.php" ?>
Could you replace <? endif ?> with <?php endif ?>
我有以下代码:
<?php if ($template['issue']['raw_state'] == 0 && ($helper->user_coordinator($template['issue']['id']) || isset($nparams['tid']))): ?>
<a href="?id=<?php echo $this->id('cause_form', 'id', $template['issue']['id']) ?>">
<?php echo $bezlang['add_cause'] ?>
</a>
<? endif ?>
它在我的大多数服务器上运行良好,但在其中一个服务器上我收到错误:
PHP Parse error: syntax error, unexpected end of file in /var/www/dokuwiki/lib/plugins/bez/tpl/issue_causes.php on line 19,
这段代码有什么问题?
整个文件issue_cause.php:
<?php include "issue_box.php" ?>
<div class="bds_block" id="bez_causes">
<h1><?php echo $bezlang['causes'] ?> <span>(<?php echo count($template['causes']) ?>)</span></h1>
<div class="bds_block_content">
<?php foreach ($template['causes'] as $cause): ?>
<?php include "cause.php" ?>
<?php endforeach ?>
</div>
<?php if ($template['issue']['raw_state'] == 0 && ($helper->user_coordinator($template['issue']['id']) || isset($nparams['tid']))): ?>
<a href="?id=<?php echo $this->id('cause_form', 'id', $template['issue']['id']) ?>">
<?php echo $bezlang['add_cause'] ?>
</a>
<? endif ?>
</div>
<?php include "removal_confirm.php" ?>
Could you replace <? endif ?> with <?php endif ?>