我的代码看起来不错,我得到状态 200,我得到正确的标题,...但我创建的 CSV 文件无法下载...
\n没有错误,所以我不明白为什么会失败。
\n这是我的代码:
\nnamespace Rac\\CaraBundle\\Manager;\n\n/* Imports */\nuse Symfony\\Component\\PropertyAccess\\PropertyAccess;\nuse Symfony\\Component\\Validator\\ValidatorInterface;\nuse Symfony\\Component\\EventDispatcher\\EventDispatcherInterface;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\nuse Symfony\\Component\\HttpFoundation\\StreamedResponse;\n\n/* Local Imports */\nuse Rac\\CaraBundle\\Entity\\Contact;\n\n/**\n * Class CSV Contact Importer\n */\nclass CSVContactImporterManager {\n\n /**\n * @var ObjectManager\n */\n private $om;\n\n /**\n * @var EventDispatcherInterface\n */\n private $eventDispatcher;\n\n /**\n * @var ValidatorInterface\n */\n private $validator;\n\n /**\n * @var ContactManager\n */\n private $contactManager;\n\n\n /**\n * @param EventDispatcherInterface $eventDispatcher\n * @param ObjectManager $om\n * @param Contact $contactManager\n *\n */\n public function __construct(\n EventDispatcherInterface $eventDispatcher, ObjectManager $om, …
Run Code Online (Sandbox Code Playgroud)