怎么在PHPExcel保存时选择路径?
请问使用PHPExcel导出Excel是如何可以自己选择保存路径??
PHP code1 | <!--Code highlighting produced by Actipro CodeHighlighter (freeware)http:
|
Copy after login
------解决方案--------------------帮顶!
------解决方案--------------------PHP code1 2 3 4 5 6 | header( "Pragma: public" );header( "Expires: 0" );header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );header( "Content-Type: application/force-download" );header( "Content-Type: application/download" );header( "Content-Disposition: attachment;filename=$outputFileName" );header( "Content-Transfer-Encoding: binary " );<br><font color= "#e78608" >------解决方案--------------------</font><br>主要是这句<br>header( 'Content-Disposition:inline;filename="' . $outputFileName . '"' ); <br>改<br>header( "Content-Disposition: attachment;filename=$outputFileName" );<br><font color= "#e78608" >------解决方案--------------------</font><br>没问题啊,你原本的代码就可以<br><br>只是第二行会出错<br>set_include_path(get_include_path() . PATH_SEPARATOR . LIB_DIR.DIRECTORY_SEPARATOR. "PHPExcel" .DIRECTORY_SEPARATOR. "Classes" );<br>改成下面就可以了<br>
</div>
|
Copy after login