简体   繁体   中英

Drupal not loading PHP on WAMP

I am working on a local dev environment for a Drupal site we are building. I am having trouble at one last step, and that is getting PHP in Drupal to execute properly. As you see below, when I view source on the localhost page being executed in PHP the HTML markup contains PHP code that should be executed server side first. I have confirmed the DB is connected fine, and this site runs fine on our production server. How can I fix this issue?

<!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>

Have you enabled PHP input filter? Have you enabled short open tag in php.ini?

You need in php.ini file edit this line from

short_open_tag = Off

to

short_open_tag = On

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM