here the scenario:
i want to print a text file to a network printer...
here's d code:
Code:
<?
$command="copy c:\\test1.txt LPT2";
$result=shell_exec($command);
echo $result;
?>
output: 0 file(s) copied
dont know why it doesnt print, i tried the command manually in dos prompt, works perfectly...
also the file is at the right directory and it does exist...
ive also tried using exec function, same result...
any idea why? and how?
note: LPT2 is an alias port of the network printer...
i used the command "net use LPT2 \\printserver\printer /persistent:yes"