Home  >  Article  >  Backend Development  >  想实现个服务端打印的功能

想实现个服务端打印的功能

WBOY
WBOYOriginal
2016-06-23 14:10:37731browse

我的思路是用exec调用外部打印工具,可是具体不知道怎么写了,EXEC不知道怎么调试,使用的外部工具是pdfprint.exe是CMD下面的打印工具,如果要软件包,可以说一下


回复讨论(解决方案)

可以使用exec或system
 exec --- 执行外部程式
  语法 : string exec ( string command [, array &output [, int &return_var]] )

 system --- 执行外部程式并且显示输出

  语法 : string system ( string command [, int &return_var] )

上面是exec的用法,例子可能是下面这么的,至于

exec("c:\pdfprint.exe ****")  ****是参数,这个你得研究pdfprint的命令行参数了

可以使用exec或system
 exec --- 执行外部程式
  语法 : string exec ( string command [, array &output [, int &return_var]] )

 system --- 执行外部程式并且显示输出

  语法 : string system ( string command [, int &return_var] )

上面是exec的用法,例子可能是下面这么的,至于

exec("c:\pdfprint.exe ****")  ****是参数,这个你得研究pdfprint的命令行参数了
有个问题,EXEC之后,整个网页直接挂起,怎么办?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn