문제

오늘 Magento2를 설치하여 시도해보십시오.

i ftp'a href="https://github.com/magento/magento2" rel="nofollow"> github 에서 내 서버에 압축 해졌지만 시도 할 때설치 프로그램을 실행하려면 아래 오류가 발생합니다.

구문 분석 오류 : /public_html/magento2/app/bootstrap.php의 구문 오류, 예기치 않은 T_Object_Operator on 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 ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top