Php 命令在cmd中工作,但在shell_exec()中不工作
我正在使用WAMP上的shell_exec打印pdf,我的代码是Php 命令在cmd中工作,但在shell_exec()中不工作,php,shell,cmd,Php,Shell,Cmd,我正在使用WAMP上的shell_exec打印pdf,我的代码是 echo '"C:\\Program Files\\Adobe\\Reader 10.0\\Reader\\AcroRd32.exe" /t c:\\bill.pdf'.'<br>'; shell_exec('"C:\\Program Files\\Adobe\\Reader 10.0\\Reader\\AcroRd32.exe" /t c:\\bill.pdf'); 这意味着shell_exec正在工作,但pr
echo '"C:\\Program Files\\Adobe\\Reader 10.0\\Reader\\AcroRd32.exe"
/t c:\\bill.pdf'.'<br>';
shell_exec('"C:\\Program Files\\Adobe\\Reader 10.0\\Reader\\AcroRd32.exe"
/t c:\\bill.pdf');
这意味着shell_exec正在工作,但print命令不工作。
我如何使用shell_exec执行print命令?可能是因为apache运行的用户与您不同?可能是它的机器位问题,请尝试以下答案@很高兴您能够解决此问题?很遗憾,编号:
Sends a print job to a network printer Usage: lpr -S server -P printer [-C class] [-J job] [-o option] [-x] [-d] filename Options: -S server Name or ipaddress of the host providing lpd service -P printer Name of the print queue -C class Job classification for use on the burst page -J job Job name to print on the burst page -o option Indicates type of the file (by default assumes a text file) Use "-o l" for binary (e.g. postscript) files -x Compatibility with SunOS 4.1.x and prior -d Send data file first