Zend Framework how to set headers

前端 未结 5 1790
天命终不由人
天命终不由人 2020-12-13 09:08

I have a question, how can I do something like this:

header(\"Content-Disposition: inline; filename=result.pdf\"); 
header(\"Content-type: application/x-pdf\         


        
5条回答
  •  囚心锁ツ
    2020-12-13 09:47

    Solved

            $this->getResponse()
             ->setHeader('Content-Disposition:inline', ';filename=result.pdf')
                 ->setHeader('Content-Type', 'application/x-pdf');
    

提交回复
热议问题