<分区>
我写了一个运行良好的代码,但后来我重新安装了我的操作系统,现在当我尝试运行它时,我不断收到这个错误。我正在使用 IIS 8.0、WebMatrix 和 PHP 5.3。
这是有问题的代码片段:
<?php
if (!$me->get_details()['quote']) : //<--error is here
?>
<p class="quote">Write some motivational quote.</p>
<?php
else :
?>
<p class="quote"><?= $me->get_details()['quote']?></p>
<?php endif; ?>
函数 get_details() 返回一个包含来自数据库的数据的关联数组。
这里可能出了什么问题?