如何在Safari浏览器中创建CSV文件下载的下载链接?
现在下载链接是这样的:
<a href="http://localhost/uploads/user-import-template/SupportUs_user_import.csv">download CSV template</a>
Run Code Online (Sandbox Code Playgroud)
问题是此链接在同一浏览器选项卡中打开CSV文件,而不是下载它.
我正在尝试实现类别和子类别结构实体,但在使用命令生成实体时最终出现此错误php app/console generate:doctrine:entities RFQIronilBundle:
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] Couldn't find constant production, class RFQ\IronilBundl
e\Entity\ProductionType.
Run Code Online (Sandbox Code Playgroud)
我创建的 ProductionType 实体:
<?php
namespace RFQ\IronilBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* ProductionType
*
* @ORM\Table(production-type)
* @ORM\Entity
*/
class ProductionType
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=100)
*/
protected $name;
/**
* @ORM\OneToMany(targetEntity="ProductionType", mappedBy="parent")
**/
protected $children;
/**
* @ORM\ManyToOne(targetEntity="ProductionType", inversedBy="children")
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
**/
protected $parent;
/**
* Get …Run Code Online (Sandbox Code Playgroud)