我使用Drupal的8在我的本地主机,而当去我的索引页,该代码将出现在我的浏览器:Drupal的8索引问题
<?php
/**
* @file
* The PHP page that serves all page requests on a Drupal installation.
*
* All Drupal code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt files in the "core" directory.
*/
use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;
$autoloader = require_once 'autoload.php';
$kernel = new DrupalKernel('prod', $autoloader);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
我试图寻找一个答案,但没有成功,直到现在。
如果在Ubuntu上你需要安装libapache2-mod-php5/libapache2-mod-php7 apt-get install libapache2-mod-php5或者你正在运行的任何合适的版本pf php – vishwa