我使用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