我今天尝试安装magento2以试用它。

i ftp'd从 github 到我的服务器并打开包装,但是当我尝试时运行安装程序,我得到以下错误。

解析错误:语法错误,意外的t_object_operator在/ opublic_html/magento2/app/bootstrap.php上行64

第59行下降是:

/**
 * Require necessary files
 */
require_once BP . '/app/functions.php';
require_once __DIR__ . '/autoload.php';
(new \Magento\Framework\Autoload\IncludePath())->addIncludePath(array(BP . '/app/code', BP . '/lib/internal'));
$classMapPath = BP . '/var/classmap.ser';
if (file_exists($classMapPath)) {
    require_once BP . '/lib/internal/Magento/Framework/Autoload/ClassMap.php';
    $classMap = new \Magento\Framework\Autoload\ClassMap(BP);
    $classMap->addMap(unserialize(file_get_contents($classMapPath)));
    spl_autoload_register(array($classMap, 'load'), true, true);
}

if (!defined('BARE_BOOTSTRAP')) {
    $maintenanceFlag = BP . '/' . \Magento\Framework\App\State\MaintenanceMode::FLAG_DIR . '/'
        . \Magento\Framework\App\State\MaintenanceMode::FLAG_FILENAME;
    if (file_exists($maintenanceFlag)) {
        if (!in_array($_SERVER['REMOTE_ADDR'], explode(",", file_get_contents($maintenanceFlag)))) {
            if (PHP_SAPI == 'cli') {
                echo 'Service temporarily unavailable due to maintenance downtime.';
            } else {
                include_once BP . '/pub/errors/503.php';
            }
            exit;
        }
    }

    if (!empty($_SERVER['MAGE_PROFILER'])) {
        \Magento\Framework\Profiler::applyConfig(
            $_SERVER['MAGE_PROFILER'],
            dirname(__DIR__),
            !empty($_REQUEST['isAjax'])
        );
    }
}
date_default_timezone_set(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE);
.

任何可能导致这个问题的想法?

有帮助吗?

解决方案

这看起来像你的php版本的问题。它需要PHP 5.4正常工作。原因如下。

类成员在实例化工作开始工作开始php 5.4

github问题从更多信息中获取。

许可以下: CC-BY-SA归因
scroll top