预计半结肠

时间:2016-12-22 14:02:23

标签: php

<?php
    'doctrine' => [
        'meta' => [
            'entity_path' => [
                'app/src/Entity'
            ],
            'auto_generate_proxies' => true,
            'proxy_dir' =>  __DIR__.'/../cache/proxies',
            'cache' => null,
        ],
        'connection' => [
            'driver'   => 'pdo_mysql',
            'host'     => 'localhost',
            'dbname'   => 'sano',
            'user'     => 'root',
            'password' => 'root',
        ]
    ]

我上面有php文件。错误发生第二行预期半冒号。 我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

$name=array(
        'doctrine' => [
            'meta' => [
                'entity_path' => [
                    'app/src/Entity'
                ],
                'auto_generate_proxies' => true,
                'proxy_dir' =>  __DIR__.'/../cache/proxies',
                'cache' => null,
            ],
            'connection' => [
                'driver'   => 'pdo_mysql',
                'host'     => 'localhost',
                'dbname'   => 'sano',
                'user'     => 'root',
                'password' => 'root',
            ]
        ]
    );

其中$name被变量名称

替换