Heim  >  Artikel  >  Backend-Entwicklung  >  想实现个服务端打印的功能

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

WBOY
WBOYOriginal
2016-06-23 14:10:37730Durchsuche

我的思路是用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之后,整个网页直接挂起,怎么办?

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn