如何在不更改原始源代码的情况下解决 session_start 冲突?Symfony 组件或 Silex 如何检查会话是否已经存在?
Notice: A session had already been started - ignoring session_start() in
myapp/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php on line 146
编辑:这是 index.php 的前几行
require_once __DIR__.'/vendor/autoload.php';
/**
* from Heroku's Facebook template
*/
require_once('AppInfo.php');
require_once('utils.php');
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\Yaml\Parser;
use Silex\Provider\FormServiceProvider;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Currently using git submodule, will move to composer.json
*/
require_once('sdk/src/facebook.php');
$facebook = new Facebook(array(
'appId' => AppInfo::appID(),
'secret' => AppInfo::appSecret(),
));
$app = new Silex\Application();
// ...