我正在为我们正在构建的 Drupal 站点开发本地开发环境。我在最后一步遇到了麻烦,那就是让 Drupal 中的 PHP 正确执行。正如您在下面看到的,当我在 PHP 中执行的 localhost 页面上查看源代码时,HTML 标记包含应该首先在服务器端执行的 PHP 代码。我已经确认数据库连接正常,并且该站点在我们的生产服务器上运行良好。我该如何解决这个问题?
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?= $language->language; ?>" lang="<?= $language->language; ?>">
<head profile="<?= $grddl_profile; ?>">
<?= $head; ?>
<title><?= $head_title; ?></title>
<?= $styles; ?>
</head>
<body class="<?= $classes; ?>" <?= $attributes;?>>
<?= $page_top; ?>
<?= $page; ?>
<?= $page_bottom; ?>
<?= $scripts; ?>
</body>
</html>